org.jcsp.nxt.util
Class VectorSet

java.lang.Object
  extended by java.util.AbstractCollection
      extended by java.util.AbstractList
          extended by java.util.Vector
              extended by org.jcsp.nxt.util.VectorSet
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class VectorSet
extends java.util.Vector

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
VectorSet()
           
 
Method Summary
 boolean add(java.lang.Object o)
          Adds the specified element to this set if it is not already present.
 void addElement(java.lang.Object o)
          Deprecated. Method does not do anything; use add instead.
 boolean contains(java.lang.Object o)
          Returns true if this set contains the specified element.
 boolean insert(java.lang.Object o, int index)
          Adds the specified element to this set, at the specified position, if it is not already present.
 void insertElementAt(java.lang.Object o, int index)
          Deprecated. Method does not do anything; use insert instead.
 void setElementAt(java.lang.Object o, int index)
          Deprecated. Method does not do anything; use a combination of removeElementAt and insert instead.
 
Methods inherited from class java.util.Vector
add, addAll, addAll, capacity, clear, clone, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

VectorSet

public VectorSet()
Method Detail

contains

public boolean contains(java.lang.Object o)
Returns true if this set contains the specified element.

Specified by:
contains in interface java.util.Collection
Specified by:
contains in interface java.util.List
Overrides:
contains in class java.util.Vector
Parameters:
o - element whose presence in this set is to be tested.

add

public boolean add(java.lang.Object o)
Adds the specified element to this set if it is not already present.

Specified by:
add in interface java.util.Collection
Specified by:
add in interface java.util.List
Overrides:
add in class java.util.Vector
Parameters:
o - element to be added to this set.
Returns:
true if the set did not already contain the specified element.

insert

public boolean insert(java.lang.Object o,
                      int index)
Adds the specified element to this set, at the specified position, if it is not already present. Each component in this vector with an index greater or equal to the specified index is shifted upward to have an index one greater than the value it had previously.

Parameters:
o - element to be added to this set.
index - position of the element.
Returns:
true if the set did not already contain the specified element.

addElement

public void addElement(java.lang.Object o)
Deprecated. Method does not do anything; use add instead.

Overrides:
addElement in class java.util.Vector

setElementAt

public void setElementAt(java.lang.Object o,
                         int index)
Deprecated. Method does not do anything; use a combination of removeElementAt and insert instead.

Overrides:
setElementAt in class java.util.Vector

insertElementAt

public void insertElementAt(java.lang.Object o,
                            int index)
Deprecated. Method does not do anything; use insert instead.

Overrides:
insertElementAt in class java.util.Vector