|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--jds.collection.SkipList
SkipList - linked list with randomized pointers to middle; for use with book Classic Data Structures in Java by Timothy A Budd, published by Addison-Wesley, 2001.
| Constructor Summary | |
SkipList()
initialize skip list with no elements |
|
SkipList(java.util.Comparator t)
initialize skip list with no elements |
|
| Method Summary | |
void |
addElement(java.lang.Object newElement)
add a new value to the collection |
boolean |
containsElement(java.lang.Object val)
see if collection contains value |
java.util.Enumeration |
elements()
Yields enumerator for collection |
java.lang.Object |
findElement(java.lang.Object val)
find element that will test equal to value |
boolean |
isEmpty()
Determines whether the collection is empty |
void |
removeElement(java.lang.Object val)
remove a new value from the collection |
int |
size()
Determines number of elements in collection |
void |
sort(Indexed v)
rearrange collection into asending order |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public SkipList()
public SkipList(java.util.Comparator t)
t - comparator to be used in ordering elements| Method Detail |
public boolean isEmpty()
public int size()
public java.util.Enumeration elements()
Enumeration that will yield the elements of the collectionEnumerationpublic void addElement(java.lang.Object newElement)
newElement - element to be inserted into collectionpublic boolean containsElement(java.lang.Object val)
value - element to be testedpublic java.lang.Object findElement(java.lang.Object val)
value - element to be testedequals to argumentpublic void removeElement(java.lang.Object val)
val - element to be removed from collectionpublic void sort(Indexed v)
data - the values to be ordered
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||