gnu.trove
Class TLinkedList.IteratorImpl
java.lang.Object
gnu.trove.TLinkedList.IteratorImpl
- TLinkedList<T,extends,TLinkable>
- ListIterator
protected final class TLinkedList.IteratorImpl
extends java.lang.Object
implements ListIterator
A ListIterator that supports additions and deletions.
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
|
add
public final void add(T linkable)
Insert linkable at the current position of the iterator.
Calling next() after add() will return the added object.
linkable
- an object of type TLinkable
hasNext
public final boolean hasNext()
True if a call to next() will return an object.
hasPrevious
public final boolean hasPrevious()
True if a call to previous() will return a value.
next
public final T next()
Returns the value at the Iterator's index and advances the
iterator.
nextIndex
public final int nextIndex()
returns the index of the next node in the list (the
one that would be returned by a call to next()).
previous
public final T previous()
Returns the value before the Iterator's index and moves the
iterator back one index.
previousIndex
public final int previousIndex()
Returns the previous element's index.
remove
public final void remove()
Removes the current element in the list and shrinks its
size accordingly.
set
public final void set(T linkable)
Replaces the current element in the list with
linkable
linkable
- an object of type TLinkable
GNU Trove is copyright B) 2001-2008 Eric D. Friedman. All Rights Reserved.