2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
8 package jalview.binding;
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(final jalview.binding.Property vProperty)
49 throws java.lang.IndexOutOfBoundsException
51 this._propertyList.addElement(vProperty);
59 * @throws java.lang.IndexOutOfBoundsException
60 * if the index given is outside the bounds of the collection
62 public void addProperty(final int index,
63 final jalview.binding.Property vProperty)
64 throws java.lang.IndexOutOfBoundsException
66 this._propertyList.add(index, vProperty);
70 * Method enumerateProperty.
72 * @return an Enumeration over all jalview.binding.Property elements
74 public java.util.Enumeration enumerateProperty()
76 return this._propertyList.elements();
83 * @throws java.lang.IndexOutOfBoundsException
84 * if the index given is outside the bounds of the collection
85 * @return the value of the jalview.binding.Property at the given index
87 public jalview.binding.Property getProperty(final int index)
88 throws java.lang.IndexOutOfBoundsException
90 // check bounds for index
91 if (index < 0 || index >= this._propertyList.size())
93 throw new IndexOutOfBoundsException("getProperty: Index value '"
94 + index + "' not in range [0.."
95 + (this._propertyList.size() - 1) + "]");
98 return (jalview.binding.Property) _propertyList.get(index);
102 * Method getProperty.Returns the contents of the collection in an Array.
104 * Note: Just in case the collection contents are changing in another thread,
105 * we pass a 0-length Array of the correct type into the API call. This way we
106 * <i>know</i> that the Array returned is of exactly the correct length.
108 * @return this collection as an Array
110 public jalview.binding.Property[] getProperty()
112 jalview.binding.Property[] array = new jalview.binding.Property[0];
113 return (jalview.binding.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(final jalview.binding.Property vProperty)
141 boolean removed = _propertyList.remove(vProperty);
146 * Method removePropertyAt.
149 * @return the element removed from the collection
151 public jalview.binding.Property removePropertyAt(final int index)
153 java.lang.Object obj = this._propertyList.remove(index);
154 return (jalview.binding.Property) obj;
162 * @throws java.lang.IndexOutOfBoundsException
163 * if the index given is outside the bounds of the collection
165 public void setProperty(final int index,
166 final jalview.binding.Property vProperty)
167 throws java.lang.IndexOutOfBoundsException
169 // check bounds for index
170 if (index < 0 || index >= this._propertyList.size())
172 throw new IndexOutOfBoundsException("setProperty: Index value '"
173 + index + "' not in range [0.."
174 + (this._propertyList.size() - 1) + "]");
177 this._propertyList.set(index, vProperty);
183 * @param vPropertyArray
185 public void setProperty(final jalview.binding.Property[] vPropertyArray)
188 _propertyList.clear();
190 for (int i = 0; i < vPropertyArray.length; i++)
192 this._propertyList.add(vPropertyArray[i]);