org.globus.util
Class SortedVector

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.Vector
              extended byorg.globus.util.SortedVector
All Implemented Interfaces:
Cloneable, Collection, List, RandomAccess, Serializable

public class SortedVector
extends 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
SortedVector()
          This constructor creates a new vector and inserts, sorted, the elements contained in the specified collection into the vector.
SortedVector(Collection c)
          This constructor creates a new vector and inserts, sorted, the elements contained in the specified collection into the vector.
 
Method Summary
 void add(int index, Object element)
          This method has been remapped to add( Object element ).
 boolean add(Object element)
          This method adds, sorted, the specified element into the vector.
 boolean addAll(Collection c)
          This method inserts, sorted, the elements contained in the specified collection into the vector.
 boolean addAll(int index, Collection c)
          This method has been remapped to addAll( Object element ).
 void addElement(Object obj)
          This method has been remapped to add( Object element ).
 int findInsertPoint(Object element)
          Find insert point.
 void insertElementAt(Object obj, int index)
          This method has been remapped to add( Object element ).
 Object set(int index, Object element)
          This method has been altered to replace the object at the specified index with the specified element but at an appropriate new index in the sorted vector corresponding to the new element value.
 void setElementAt(int index, Object obj)
          This method has been altered to replace the object at the specified index with the specified element but at an appropriate new index in the sorted vector corresponding to the new element value.
 
Methods inherited from class java.util.Vector
capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, setElementAt, 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

SortedVector

public SortedVector()
This constructor creates a new vector and inserts, sorted, the elements contained in the specified collection into the vector.


SortedVector

public SortedVector(Collection c)
This constructor creates a new vector and inserts, sorted, the elements contained in the specified collection into the vector.

Method Detail

add

public boolean add(Object element)
This method adds, sorted, the specified element into the vector.

Parameters:
element - the element to be added to the vector

findInsertPoint

public int findInsertPoint(Object element)
Find insert point.

Parameters:
element - object to insert.
Returns:
insertion point index.

addAll

public boolean addAll(Collection c)
This method inserts, sorted, the elements contained in the specified collection into the vector.

Parameters:
c - the Collection of elements to be added to the sorted vector
Returns:
true if all elements were successfully added to the vector; false otherwise

add

public void add(int index,
                Object element)
This method has been remapped to add( Object element ). Since this class sorts all elements placed in the Vector, adding elements at a specific index is not allowed.


addElement

public void addElement(Object obj)
This method has been remapped to add( Object element ).


addAll

public boolean addAll(int index,
                      Collection c)
This method has been remapped to addAll( Object element ). Since this class sorts all elements placed in the Vector, adding elements at a specific index is not allowed.


insertElementAt

public void insertElementAt(Object obj,
                            int index)
This method has been remapped to add( Object element ). Since this class sorts all elements placed in the Vector, adding elements at a specific index is not allowed.


set

public Object set(int index,
                  Object element)
This method has been altered to replace the object at the specified index with the specified element but at an appropriate new index in the sorted vector corresponding to the new element value. Since this class sorts all elements placed in the Vector, setting elements at a specific index is not allowed.


setElementAt

public void setElementAt(int index,
                         Object obj)
This method has been altered to replace the object at the specified index with the specified element but at an appropriate new index in the sorted vector corresponding to the new element value. Since this class sorts all elements placed in the Vector, setting elements at a specific index is not allowed.