*/
private java.util.Vector _propertyList;
- /**
- * Field _mappingList.
- */
- private java.util.Vector _mappingList;
-
//----------------/
//- Constructors -/
public SequenceType() {
super();
this._propertyList = new java.util.Vector();
- this._mappingList = new java.util.Vector();
}
/**
*
*
- * @param vMapping
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addMapping(
- final uk.ac.vamsas.objects.core.Mapping vMapping)
- throws java.lang.IndexOutOfBoundsException {
- this._mappingList.addElement(vMapping);
- }
-
- /**
- *
- *
- * @param index
- * @param vMapping
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addMapping(
- final int index,
- final uk.ac.vamsas.objects.core.Mapping vMapping)
- throws java.lang.IndexOutOfBoundsException {
- this._mappingList.add(index, vMapping);
- }
-
- /**
- *
- *
* @param vProperty
* @throws java.lang.IndexOutOfBoundsException if the index
* given is outside the bounds of the collection
}
/**
- * Method enumerateMapping.
- *
- * @return an Enumeration over all
- * uk.ac.vamsas.objects.core.Mapping elements
- */
- public java.util.Enumeration enumerateMapping(
- ) {
- return this._mappingList.elements();
- }
-
- /**
* Method enumerateProperty.
*
* @return an Enumeration over all
}
else if (temp._propertyList != null)
return false;
- if (this._mappingList != null) {
- if (temp._mappingList == null) return false;
- else if (!(this._mappingList.equals(temp._mappingList)))
- return false;
- }
- else if (temp._mappingList != null)
- return false;
return true;
}
return false;
}
/**
- * Method getMapping.
- *
- * @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.Mapping
- * at the given index
- */
- public uk.ac.vamsas.objects.core.Mapping getMapping(
- final int index)
- throws java.lang.IndexOutOfBoundsException {
- // check bounds for index
- if (index < 0 || index >= this._mappingList.size()) {
- throw new IndexOutOfBoundsException("getMapping: Index value '" + index + "' not in range [0.." + (this._mappingList.size() - 1) + "]");
- }
-
- return (uk.ac.vamsas.objects.core.Mapping) _mappingList.get(index);
- }
-
- /**
- * Method getMapping.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.Mapping[] getMapping(
- ) {
- uk.ac.vamsas.objects.core.Mapping[] array = new uk.ac.vamsas.objects.core.Mapping[0];
- return (uk.ac.vamsas.objects.core.Mapping[]) this._mappingList.toArray(array);
- }
-
- /**
- * Method getMappingAsReference.Returns a reference to
- * '_mappingList'. No type checking is performed on any
- * modifications to the Vector.
- *
- * @return a reference to the Vector backing this class
- */
- public java.util.Vector getMappingAsReference(
- ) {
- return this._mappingList;
- }
-
- /**
- * Method getMappingCount.
- *
- * @return the size of this collection
- */
- public int getMappingCount(
- ) {
- return this._mappingList.size();
- }
-
- /**
* Returns the value of field 'name'.
*
* @return the value of field 'Name'.
if (_propertyList != null) {
result = 37 * result + _propertyList.hashCode();
}
- if (_mappingList != null) {
- result = 37 * result + _mappingList.hashCode();
- }
return result;
}
/**
*/
- public void removeAllMapping(
- ) {
- this._mappingList.clear();
- }
-
- /**
- */
public void removeAllProperty(
) {
this._propertyList.clear();
}
/**
- * Method removeMapping.
- *
- * @param vMapping
- * @return true if the object was removed from the collection.
- */
- public boolean removeMapping(
- final uk.ac.vamsas.objects.core.Mapping vMapping) {
- boolean removed = _mappingList.remove(vMapping);
- return removed;
- }
-
- /**
- * Method removeMappingAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public uk.ac.vamsas.objects.core.Mapping removeMappingAt(
- final int index) {
- java.lang.Object obj = this._mappingList.remove(index);
- return (uk.ac.vamsas.objects.core.Mapping) obj;
- }
-
- /**
* Method removeProperty.
*
* @param vProperty
}
/**
- *
- *
- * @param index
- * @param vMapping
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setMapping(
- final int index,
- final uk.ac.vamsas.objects.core.Mapping vMapping)
- throws java.lang.IndexOutOfBoundsException {
- // check bounds for index
- if (index < 0 || index >= this._mappingList.size()) {
- throw new IndexOutOfBoundsException("setMapping: Index value '" + index + "' not in range [0.." + (this._mappingList.size() - 1) + "]");
- }
-
- this._mappingList.set(index, vMapping);
- }
-
- /**
- *
- *
- * @param vMappingArray
- */
- public void setMapping(
- final uk.ac.vamsas.objects.core.Mapping[] vMappingArray) {
- //-- copy array
- _mappingList.clear();
-
- for (int i = 0; i < vMappingArray.length; i++) {
- this._mappingList.add(vMappingArray[i]);
- }
- }
-
- /**
- * Sets the value of '_mappingList' by copying the given
- * Vector. All elements will be checked for type safety.
- *
- * @param vMappingList the Vector to copy.
- */
- public void setMapping(
- final java.util.Vector vMappingList) {
- // copy vector
- this._mappingList.clear();
-
- this._mappingList.addAll(vMappingList);
- }
-
- /**
- * Sets the value of '_mappingList' by setting it to the given
- * Vector. No type checking is performed.
- * @deprecated
- *
- * @param mappingVector the Vector to set.
- */
- public void setMappingAsReference(
- final java.util.Vector mappingVector) {
- this._mappingList = mappingVector;
- }
-
- /**
* Sets the value of field 'name'.
*
* @param name the value of field 'name'.