protected final class TLinkedList.IteratorImpl
extends java.lang.Object
implements java.util.ListIterator<T>
Modifier and Type | Method and Description |
---|---|
void |
add(T linkable)
Insert linkable at the current position of the iterator.
|
boolean |
hasNext()
True if a call to next() will return an object.
|
boolean |
hasPrevious()
True if a call to previous() will return a value.
|
T |
next()
Returns the value at the Iterator's index and advances the
iterator.
|
int |
nextIndex()
returns the index of the next node in the list (the
one that would be returned by a call to next()).
|
T |
previous()
Returns the value before the Iterator's index and moves the
iterator back one index.
|
int |
previousIndex()
Returns the previous element's index.
|
void |
remove()
Removes the current element in the list and shrinks its
size accordingly.
|
void |
set(T linkable)
Replaces the current element in the list with
linkable
|
public final void add(T linkable)
public final boolean hasNext()
public final boolean hasPrevious()
public final T next()
public final int nextIndex()
public final T previous()
public final int previousIndex()
public final void remove()
remove
in interface java.util.Iterator<T extends TLinkable>
remove
in interface java.util.ListIterator<T extends TLinkable>
java.lang.IllegalStateException
- neither next nor previous
have been invoked, or remove or add have been invoked after
the last invocation of next or previous.GNU Trove is copyright ? 2001-2009 Eric D. Friedman. All Rights Reserved.