|
|||||||||
| 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
org.mmbase.util.SortedVector
Class to store Objects in, in a Sorted manner
Sortable,
CompareInterface,
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()
Create a SortedVector |
|
SortedVector(CompareInterface cmp)
Create a SortedVector, specifying which compare function to use. |
|
| Method Summary | |
void |
addBinSorted(java.lang.Object newObject)
Store an object in its right location, search for the location the binary (smart) way. |
void |
addLinSorted(java.lang.Object newObject)
Store an object in its right location, search for the location the linear (stupid) way. |
void |
addSorted(java.lang.Object newObject)
Store an object in its right location. |
void |
addSorted(Sortable newObject)
Store an object in its right location. |
void |
addUniqueSorted(java.lang.Object newObject)
Store an object in its right location, search for the location the binary (smart) way and only insert it if it's not in the Vector yet. |
int |
find(java.lang.Object newObject)
Find an object in the SortedVector. |
boolean |
has(java.lang.Object newObject)
See if an object is in the SortedVector This should be contains(Object) but that one is final. |
static void |
main(java.lang.String[] args)
Test the class |
void |
setCompare(CompareInterface cmp)
Change the compare function the SortedVector should use. |
void |
Sort()
Sort the SortedVector |
static SortedVector |
SortVector(java.util.Vector vec)
Sort a Vector and return a SortedVector. |
static SortedVector |
SortVector(java.util.Vector vec,
CompareInterface cmpI)
Sort a Vector and return a SortedVector using the specified compare function. |
| Methods inherited from class java.util.Vector |
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, 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 SortedVector()
public SortedVector(CompareInterface cmp)
CompareInterface| Method Detail |
public void addSorted(java.lang.Object newObject)
public void addSorted(Sortable newObject)
public void addUniqueSorted(java.lang.Object newObject)
public void addLinSorted(java.lang.Object newObject)
public void addBinSorted(java.lang.Object newObject)
public boolean has(java.lang.Object newObject)
Vectorpublic int find(java.lang.Object newObject)
Vectorpublic void setCompare(CompareInterface cmp)
public void Sort()
public static SortedVector SortVector(java.util.Vector vec)
public static SortedVector SortVector(java.util.Vector vec,
CompareInterface cmpI)
public static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||