|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
java.util.Vector
com.imagero.util.SortableVector
SortableVector.java this Vector is not always sorted, but it can be sorted 'in place'
| Field Summary |
| Fields inherited from class java.util.Vector |
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
SortableVector()
|
|
SortableVector(java.util.Collection c)
|
|
SortableVector(int initialCapacity)
|
|
SortableVector(int initialCapacity,
int capacityIncrement)
|
|
| Method Summary | |
void |
add(int index,
java.lang.Object element)
overriden to set sorted to false |
boolean |
add(java.lang.Object o)
overriden to set sorted to false |
boolean |
addAll(java.util.Collection c)
overriden to set sorted to false |
boolean |
addAll(int index,
java.util.Collection c)
overriden to set sorted to false |
void |
addElement(java.lang.Object obj)
overriden to set sorted to false |
java.util.Comparator |
getComparator()
get actual comparator used to sort and search operations |
int |
indexOf(java.lang.Object elem)
Searches for the first occurence of the given argument. |
void |
insertElementAt(java.lang.Object obj,
int index)
overriden to set sorted to false |
boolean |
isSorted()
|
void |
setComparator(java.util.Comparator comparator)
set new comparator no sorting are performed - just set sorted to false |
void |
sort()
use default comparator to sort elements |
void |
sort(java.util.Comparator c)
sort elements with new comparator side effect - change default comparator |
| Methods inherited from class java.util.Vector |
capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, 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 |
public SortableVector()
public SortableVector(java.util.Collection c)
public SortableVector(int initialCapacity)
public SortableVector(int initialCapacity,
int capacityIncrement)
| Method Detail |
public void add(int index,
java.lang.Object element)
index - index at which the specified element is to be inserted.element - element to be inserted.public boolean add(java.lang.Object o)
o - element to be appended to this Vector.
public boolean addAll(java.util.Collection c)
c - elements to be inserted into this Vector.
public boolean addAll(int index,
java.util.Collection c)
index - index at which to insert first element
from the specified collection.c - elements to be inserted into this Vector.
public void addElement(java.lang.Object obj)
obj - the component to be added.Vector.add(Object),
Listpublic java.util.Comparator getComparator()
public int indexOf(java.lang.Object elem)
elem - an object.
-1 if the object is not found.Object.equals(Object)
public void insertElementAt(java.lang.Object obj,
int index)
obj - the component to insert.index - where to insert the new component.Vector.size(),
Vector.add(int, Object),
Listpublic boolean isSorted()
public void setComparator(java.util.Comparator comparator)
public void sort()
public void sort(java.util.Comparator c)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||