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