*/
private java.util.Vector _dbRefList;
+ /**
+ * explicitly named cross reference to other objects in the
+ * document.
+ *
+ */
+ private java.util.Vector _vxrefList;
+
//----------------/
//- Constructors -/
public Sequence() {
super();
this._dbRefList = new java.util.Vector();
+ this._vxrefList = new java.util.Vector();
}
}
/**
+ *
+ *
+ * @param vVxref
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addVxref(
+ final uk.ac.vamsas.objects.core.Vxref vVxref)
+ throws java.lang.IndexOutOfBoundsException {
+ this._vxrefList.addElement(vVxref);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vVxref
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addVxref(
+ final int index,
+ final uk.ac.vamsas.objects.core.Vxref vVxref)
+ throws java.lang.IndexOutOfBoundsException {
+ this._vxrefList.add(index, vVxref);
+ }
+
+ /**
* Method enumerateDbRef.
*
* @return an Enumeration over all
}
/**
+ * Method enumerateVxref.
+ *
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.Vxref elements
+ */
+ public java.util.Enumeration enumerateVxref(
+ ) {
+ return this._vxrefList.elements();
+ }
+
+ /**
* Overrides the java.lang.Object.equals method.
*
* @param obj
}
else if (temp._dbRefList != null)
return false;
+ if (this._vxrefList != null) {
+ if (temp._vxrefList == null) return false;
+ else if (!(this._vxrefList.equals(temp._vxrefList)))
+ return false;
+ }
+ else if (temp._vxrefList != null)
+ return false;
return true;
}
return false;
}
/**
+ * Method getVxref.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the uk.ac.vamsas.objects.core.Vxref at
+ * the given index
+ */
+ public uk.ac.vamsas.objects.core.Vxref getVxref(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._vxrefList.size()) {
+ throw new IndexOutOfBoundsException("getVxref: Index value '" + index + "' not in range [0.." + (this._vxrefList.size() - 1) + "]");
+ }
+
+ return (uk.ac.vamsas.objects.core.Vxref) _vxrefList.get(index);
+ }
+
+ /**
+ * Method getVxref.Returns the contents of the collection in an
+ * Array. <p>Note: Just in case the collection contents are
+ * changing in another thread, we pass a 0-length Array of the
+ * correct type into the API call. This way we <i>know</i>
+ * that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public uk.ac.vamsas.objects.core.Vxref[] getVxref(
+ ) {
+ uk.ac.vamsas.objects.core.Vxref[] array = new uk.ac.vamsas.objects.core.Vxref[0];
+ return (uk.ac.vamsas.objects.core.Vxref[]) this._vxrefList.toArray(array);
+ }
+
+ /**
+ * Method getVxrefAsReference.Returns a reference to
+ * '_vxrefList'. No type checking is performed on any
+ * modifications to the Vector.
+ *
+ * @return a reference to the Vector backing this class
+ */
+ public java.util.Vector getVxrefAsReference(
+ ) {
+ return this._vxrefList;
+ }
+
+ /**
+ * Method getVxrefCount.
+ *
+ * @return the size of this collection
+ */
+ public int getVxrefCount(
+ ) {
+ return this._vxrefList.size();
+ }
+
+ /**
* Overrides the java.lang.Object.hashCode method.
* <p>
* The following steps came from <b>Effective Java Programming
if (_dbRefList != null) {
result = 37 * result + _dbRefList.hashCode();
}
+ if (_vxrefList != null) {
+ result = 37 * result + _vxrefList.hashCode();
+ }
return result;
}
}
/**
+ */
+ public void removeAllVxref(
+ ) {
+ this._vxrefList.clear();
+ }
+
+ /**
* Method removeDbRef.
*
* @param vDbRef
}
/**
+ * Method removeVxref.
+ *
+ * @param vVxref
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeVxref(
+ final uk.ac.vamsas.objects.core.Vxref vVxref) {
+ boolean removed = _vxrefList.remove(vVxref);
+ return removed;
+ }
+
+ /**
+ * Method removeVxrefAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public uk.ac.vamsas.objects.core.Vxref removeVxrefAt(
+ final int index) {
+ java.lang.Object obj = this._vxrefList.remove(index);
+ return (uk.ac.vamsas.objects.core.Vxref) obj;
+ }
+
+ /**
*
*
* @param index
}
/**
+ *
+ *
+ * @param index
+ * @param vVxref
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setVxref(
+ final int index,
+ final uk.ac.vamsas.objects.core.Vxref vVxref)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._vxrefList.size()) {
+ throw new IndexOutOfBoundsException("setVxref: Index value '" + index + "' not in range [0.." + (this._vxrefList.size() - 1) + "]");
+ }
+
+ this._vxrefList.set(index, vVxref);
+ }
+
+ /**
+ *
+ *
+ * @param vVxrefArray
+ */
+ public void setVxref(
+ final uk.ac.vamsas.objects.core.Vxref[] vVxrefArray) {
+ //-- copy array
+ _vxrefList.clear();
+
+ for (int i = 0; i < vVxrefArray.length; i++) {
+ this._vxrefList.add(vVxrefArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of '_vxrefList' by copying the given Vector.
+ * All elements will be checked for type safety.
+ *
+ * @param vVxrefList the Vector to copy.
+ */
+ public void setVxref(
+ final java.util.Vector vVxrefList) {
+ // copy vector
+ this._vxrefList.clear();
+
+ this._vxrefList.addAll(vVxrefList);
+ }
+
+ /**
+ * Sets the value of '_vxrefList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param vxrefVector the Vector to set.
+ */
+ public void setVxrefAsReference(
+ final java.util.Vector vxrefVector) {
+ this._vxrefList = vxrefVector;
+ }
+
+ /**
* Method unmarshal.
*
* @param reader