*/
private java.util.Vector _colourList;
+ /**
+ * Field _filterList.
+ */
+ private java.util.Vector _filterList;
+
// ----------------/
// - Constructors -/
// ----------------/
{
super();
this._colourList = new java.util.Vector();
+ this._filterList = new java.util.Vector();
}
// -----------/
}
/**
+ *
+ *
+ * @param vFilter
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addFilter(final Filter vFilter)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._filterList.addElement(vFilter);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vFilter
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addFilter(final int index, final Filter vFilter)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._filterList.add(index, vFilter);
+ }
+
+ /**
* Method enumerateColour.
*
* @return an Enumeration over all Colour elements
}
/**
+ * Method enumerateFilter.
+ *
+ * @return an Enumeration over all Filter elements
+ */
+ public java.util.Enumeration enumerateFilter()
+ {
+ return this._filterList.elements();
+ }
+
+ /**
* Method getColour.
*
* @param index
// check bounds for index
if (index < 0 || index >= this._colourList.size())
{
- throw new IndexOutOfBoundsException("getColour: Index value '"
- + index + "' not in range [0.."
- + (this._colourList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(
+ "getColour: Index value '" + index + "' not in range [0.."
+ + (this._colourList.size() - 1) + "]");
}
return (Colour) _colourList.get(index);
}
/**
+ * Method getFilter.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the Filter at the given index
+ */
+ public Filter getFilter(final int index)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ // check bounds for index
+ if (index < 0 || index >= this._filterList.size())
+ {
+ throw new IndexOutOfBoundsException(
+ "getFilter: Index value '" + index + "' not in range [0.."
+ + (this._filterList.size() - 1) + "]");
+ }
+
+ return (Filter) _filterList.get(index);
+ }
+
+ /**
+ * Method getFilter.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 Filter[] getFilter()
+ {
+ Filter[] array = new Filter[0];
+ return (Filter[]) this._filterList.toArray(array);
+ }
+
+ /**
+ * Method getFilterCount.
+ *
+ * @return the size of this collection
+ */
+ public int getFilterCount()
+ {
+ return this._filterList.size();
+ }
+
+ /**
* Returns the value of field 'schemeName'.
*
* @return the value of field 'SchemeName'.
}
/**
- */
+ */
public void removeAllColour()
{
this._colourList.clear();
}
/**
+ */
+ public void removeAllFilter()
+ {
+ this._filterList.clear();
+ }
+
+ /**
* Method removeColour.
*
* @param vColour
}
/**
+ * Method removeFilter.
+ *
+ * @param vFilter
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeFilter(final Filter vFilter)
+ {
+ boolean removed = _filterList.remove(vFilter);
+ return removed;
+ }
+
+ /**
+ * Method removeFilterAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public Filter removeFilterAt(final int index)
+ {
+ java.lang.Object obj = this._filterList.remove(index);
+ return (Filter) obj;
+ }
+
+ /**
*
*
* @param index
// check bounds for index
if (index < 0 || index >= this._colourList.size())
{
- throw new IndexOutOfBoundsException("setColour: Index value '"
- + index + "' not in range [0.."
- + (this._colourList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(
+ "setColour: Index value '" + index + "' not in range [0.."
+ + (this._colourList.size() - 1) + "]");
}
this._colourList.set(index, vColour);
}
/**
+ *
+ *
+ * @param index
+ * @param vFilter
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setFilter(final int index, final Filter vFilter)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ // check bounds for index
+ if (index < 0 || index >= this._filterList.size())
+ {
+ throw new IndexOutOfBoundsException(
+ "setFilter: Index value '" + index + "' not in range [0.."
+ + (this._filterList.size() - 1) + "]");
+ }
+
+ this._filterList.set(index, vFilter);
+ }
+
+ /**
+ *
+ *
+ * @param vFilterArray
+ */
+ public void setFilter(final Filter[] vFilterArray)
+ {
+ // -- copy array
+ _filterList.clear();
+
+ for (int i = 0; i < vFilterArray.length; i++)
+ {
+ this._filterList.add(vFilterArray[i]);
+ }
+ }
+
+ /**
* Sets the value of field 'schemeName'.
*
* @param schemeName