2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
8 package jalview.schemabinding.version2;
13 * @version $Revision$ $Date$
15 public class PdbentryItem implements java.io.Serializable {
18 //--------------------------/
19 //- Class/Member Variables -/
20 //--------------------------/
23 * Field _propertyList.
25 private java.util.Vector _propertyList;
32 public PdbentryItem() {
34 this._propertyList = new java.util.Vector();
46 * @throws java.lang.IndexOutOfBoundsException if the index
47 * given is outside the bounds of the collection
49 public void addProperty(
50 final jalview.schemabinding.version2.Property vProperty)
51 throws java.lang.IndexOutOfBoundsException {
52 this._propertyList.addElement(vProperty);
60 * @throws java.lang.IndexOutOfBoundsException if the index
61 * given is outside the bounds of the collection
63 public void addProperty(
65 final jalview.schemabinding.version2.Property vProperty)
66 throws java.lang.IndexOutOfBoundsException {
67 this._propertyList.add(index, vProperty);
71 * Method enumerateProperty.
73 * @return an Enumeration over all
74 * jalview.schemabinding.version2.Property elements
76 public java.util.Enumeration enumerateProperty(
78 return this._propertyList.elements();
85 * @throws java.lang.IndexOutOfBoundsException if the index
86 * given is outside the bounds of the collection
87 * @return the value of the
88 * jalview.schemabinding.version2.Property at the given index
90 public jalview.schemabinding.version2.Property getProperty(
92 throws java.lang.IndexOutOfBoundsException {
93 // check bounds for index
94 if (index < 0 || index >= this._propertyList.size()) {
95 throw new IndexOutOfBoundsException("getProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
98 return (jalview.schemabinding.version2.Property) _propertyList.get(index);
102 * Method getProperty.Returns the contents of the collection in
103 * an Array. <p>Note: Just in case the collection contents
104 * are changing in another thread, we pass a 0-length Array of
105 * the correct type into the API call. This way we <i>know</i>
106 * that the Array returned is of exactly the correct length.
108 * @return this collection as an Array
110 public jalview.schemabinding.version2.Property[] getProperty(
112 jalview.schemabinding.version2.Property[] array = new jalview.schemabinding.version2.Property[0];
113 return (jalview.schemabinding.version2.Property[]) this._propertyList.toArray(array);
117 * Method getPropertyCount.
119 * @return the size of this collection
121 public int getPropertyCount(
123 return this._propertyList.size();
128 public void removeAllProperty(
130 this._propertyList.clear();
134 * Method removeProperty.
137 * @return true if the object was removed from the collection.
139 public boolean removeProperty(
140 final jalview.schemabinding.version2.Property vProperty) {
141 boolean removed = _propertyList.remove(vProperty);
146 * Method removePropertyAt.
149 * @return the element removed from the collection
151 public jalview.schemabinding.version2.Property removePropertyAt(
153 java.lang.Object obj = this._propertyList.remove(index);
154 return (jalview.schemabinding.version2.Property) obj;
162 * @throws java.lang.IndexOutOfBoundsException if the index
163 * given is outside the bounds of the collection
165 public void setProperty(
167 final jalview.schemabinding.version2.Property vProperty)
168 throws java.lang.IndexOutOfBoundsException {
169 // check bounds for index
170 if (index < 0 || index >= this._propertyList.size()) {
171 throw new IndexOutOfBoundsException("setProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
174 this._propertyList.set(index, vProperty);
180 * @param vPropertyArray
182 public void setProperty(
183 final jalview.schemabinding.version2.Property[] vPropertyArray) {
185 _propertyList.clear();
187 for (int i = 0; i < vPropertyArray.length; i++) {
188 this._propertyList.add(vPropertyArray[i]);