|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.device.api.util.SimpleSortingVector
Simple sorting vector of objects.
| Constructor Summary | ||
SimpleSortingVector()
Constructs a new SimpleSortingVector instance. |
||
| Method Summary | ||
void |
add(Object obj)
Adds provided object to this vector. |
|
int |
find(Object key)
Find an object in the vector based on a given key. |
|
Object |
getAt(int index)
Retrieves element by index. |
|
Vector |
getVector()
Retrieves this sorting vector's contents. |
|
void |
remove(int index)
Removes element by index. |
|
void |
removeAll()
Flushes this vector. |
|
void |
reSort()
Sorts this vector. |
|
boolean |
setSort(boolean toSort)
Specifies whether this vector should sort dynamically. |
|
void |
setSortComparator(Comparator newComparator)
Sets a new comparator for use with this sorting vector. |
|
int |
size()
Retrieves the number of elements in this vector. |
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
| Method Detail |
public Vector getVector()
Invoke this method to retrieve this sorting vector's contents in Vector object.
public void setSortComparator(Comparator newComparator)
If this vector is currently set to be sorted as elements are added, then this method also sorts the vector.
newComparator - New comparator to use when sorting this vector.public boolean setSort(boolean toSort)
toSort - If true, this vector sorts as new elements are added, or
when a new comparator is specified; if false, then you must manually
invoke reSort() to sort this vector.public void add(Object obj)
If this vector was set to sort dynamically, then this vector sorts itself after the addition.
obj - Object to add.public Object getAt(int index)
index - Index of element of retrieve.public void remove(int index)
index - Index of element to remove from this vector.public void removeAll()
This method removes all elements from the vector.
public int size()
public int find(Object key)
key - The key to look for in the vector.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2002 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.