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;
34 this._propertyList = new java.util.Vector();
45 * @throws java.lang.IndexOutOfBoundsException
46 * if the index given is outside the bounds of the collection
48 public void addProperty(
49 final jalview.schemabinding.version2.Property vProperty)
50 throws java.lang.IndexOutOfBoundsException
52 this._propertyList.addElement(vProperty);
60 * @throws java.lang.IndexOutOfBoundsException
61 * if the index given is outside the bounds of the collection
63 public void addProperty(final int index,
64 final jalview.schemabinding.version2.Property vProperty)
65 throws java.lang.IndexOutOfBoundsException
67 this._propertyList.add(index, vProperty);
71 * Method enumerateProperty.
73 * @return an Enumeration over all jalview.schemabinding.version2.Property
76 public java.util.Enumeration enumerateProperty()
78 return this._propertyList.elements();
85 * @throws java.lang.IndexOutOfBoundsException
86 * if the index given is outside the bounds of the collection
87 * @return the value of the jalview.schemabinding.version2.Property at the
90 public jalview.schemabinding.version2.Property getProperty(final int index)
91 throws java.lang.IndexOutOfBoundsException
93 // check bounds for index
94 if (index < 0 || index >= this._propertyList.size())
96 throw new IndexOutOfBoundsException("getProperty: Index value '"
97 + index + "' not in range [0.."
98 + (this._propertyList.size() - 1) + "]");
101 return (jalview.schemabinding.version2.Property) _propertyList
106 * Method getProperty.Returns the contents of the collection in an Array.
108 * Note: Just in case the collection contents are changing in another thread,
109 * we pass a 0-length Array of the correct type into the API call. This way we
110 * <i>know</i> that the Array returned is of exactly the correct length.
112 * @return this collection as an Array
114 public jalview.schemabinding.version2.Property[] getProperty()
116 jalview.schemabinding.version2.Property[] array = new jalview.schemabinding.version2.Property[0];
117 return (jalview.schemabinding.version2.Property[]) this._propertyList
122 * Method getPropertyCount.
124 * @return the size of this collection
126 public int getPropertyCount()
128 return this._propertyList.size();
133 public void removeAllProperty()
135 this._propertyList.clear();
139 * Method removeProperty.
142 * @return true if the object was removed from the collection.
144 public boolean removeProperty(
145 final jalview.schemabinding.version2.Property vProperty)
147 boolean removed = _propertyList.remove(vProperty);
152 * Method removePropertyAt.
155 * @return the element removed from the collection
157 public jalview.schemabinding.version2.Property removePropertyAt(
160 java.lang.Object obj = this._propertyList.remove(index);
161 return (jalview.schemabinding.version2.Property) obj;
169 * @throws java.lang.IndexOutOfBoundsException
170 * if the index given is outside the bounds of the collection
172 public void setProperty(final int index,
173 final jalview.schemabinding.version2.Property vProperty)
174 throws java.lang.IndexOutOfBoundsException
176 // check bounds for index
177 if (index < 0 || index >= this._propertyList.size())
179 throw new IndexOutOfBoundsException("setProperty: Index value '"
180 + index + "' not in range [0.."
181 + (this._propertyList.size() - 1) + "]");
184 this._propertyList.set(index, vProperty);
190 * @param vPropertyArray
192 public void setProperty(
193 final jalview.schemabinding.version2.Property[] vPropertyArray)
196 _propertyList.clear();
198 for (int i = 0; i < vPropertyArray.length; i++)
200 this._propertyList.add(vPropertyArray[i]);