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(java.util.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,
java.lang.Object element)
This method has been remapped to add( Object element ).
boolean
add(java.lang.Object element)
This method adds, sorted, the specified element into the vector.
boolean
addAll(java.util.Collection c)
This method inserts, sorted, the elements contained in the specified
collection into the vector.
boolean
addAll(int index,
java.util.Collection c)
This method has been remapped to addAll( Object element ).
void
addElement(java.lang.Object obj)
This method has been remapped to add( Object element ).
void
insertElementAt(java.lang.Object obj,
int index)
This method has been remapped to add( Object element ).
java.lang.Object
set(int index,
java.lang.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,
java.lang.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.
This constructor creates a new vector and inserts, sorted, the elements
contained in the specified collection into the vector.
SortedVector
public SortedVector(java.util.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(java.lang.Object element)
This method adds, sorted, the specified element into the vector.
Specified by:
add in interface java.util.List
Overrides:
add in class java.util.Vector
Parameters:
element - the element to be added to the vector
addAll
public boolean addAll(java.util.Collection c)
This method inserts, sorted, the elements contained in the specified
collection into the vector.
Specified by:
addAll in interface java.util.List
Overrides:
addAll in class java.util.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,
java.lang.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.
Specified by:
add in interface java.util.List
Overrides:
add in class java.util.Vector
addElement
public void addElement(java.lang.Object obj)
This method has been remapped to add( Object element ).
Overrides:
addElement in class java.util.Vector
addAll
public boolean addAll(int index,
java.util.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.
Specified by:
addAll in interface java.util.List
Overrides:
addAll in class java.util.Vector
insertElementAt
public void insertElementAt(java.lang.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.
Overrides:
insertElementAt in class java.util.Vector
set
public java.lang.Object set(int index,
java.lang.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.
Specified by:
set in interface java.util.List
Overrides:
set in class java.util.Vector
setElementAt
public void setElementAt(int index,
java.lang.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.