FreeWRL/FreeX3D  3.0.0
MField.java
1 package vrml;
2 import java.util.Vector;
3 
4 public abstract class MField extends Field
5 {
6  public Vector __vect = new Vector();
7 
8  public int getSize() {
9  __updateRead();
10  return __vect.size();
11  }
12 
13  public void clear() {
14  __vect.clear();
15  __updateWrite();
16  }
17 
18  public void delete(int index) {
19  __updateRead();
20  __vect.removeElementAt(index);
21  __updateWrite();
22  }
23 
24  protected final void __update1Read(int index) {
25  __updateRead();
26  }
27 
28  protected final void __set1Value(int index, ConstField fld) {
29  __updateRead();
30  fld.__updateRead();
31  __vect.setElementAt(fld, index);
32  __updateWrite();
33  }
34 
35  protected final void __insertValue(int index, ConstField fld) {
36  __updateRead();
37  fld.__updateRead();
38  __vect.insertElementAt(fld, index);
39  __updateWrite();
40  }
41 
42  protected final void __addValue(ConstField fld) {
43  __updateRead();
44  fld.__updateRead();
45  __vect.addElement(fld);
46  __updateWrite();
47  }
48 }
49 
50