|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgoldman.collection.AbstractCollection.AbstractLocator<E>
goldman.collection.ordered.SkipList.Tracker
protected class SkipList.Tracker
Field Summary |
---|
Fields inherited from class goldman.collection.AbstractCollection.AbstractLocator |
---|
versionNumber |
Method Summary | |
---|---|
boolean |
advance()
Moves the tracker to the next element in the iteration order (or tail if
the last element is currently tracked). |
E |
get()
Returns the element associated with this locator. |
boolean |
hasNext()
|
boolean |
inCollection()
Returns true if and only if the locator is at an element of the collection. |
void |
remove()
Removes the tracked element and updates the tracker to be at the element in the iteration order that preceded the one removed. |
boolean |
retreat()
Moves the tracker to the previous element in the iteration order (or head if the
first element is currently tracked). |
Methods inherited from class goldman.collection.AbstractCollection.AbstractLocator |
---|
checkValidity, ignoreConcurrentModifications, ignorePriorConcurrentModifications, next, updateVersion |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public boolean inCollection()
Locator
public E get()
Locator
inCollection
method can be
used to determine if a tracked element is currently in the collection.
If the locator is at FORE or AFT then
a NoSuchElementException
is thrown.
NoSuchElementException
- tracker is not at an element in
the collection.public boolean advance()
tail
if
the last element is currently tracked).
AtBoundaryException
- the tracker is at tail
since there is
no place to advance.public boolean retreat()
head
if the
first element is currently tracked).
AtBoundaryException
- the tracker is at head
since then there is
no place to retreat.public boolean hasNext()
public void remove()
NoSuchElementException
- the tracker is at FORE or AFT
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |