protected final class TLinkedList.IteratorImpl extends Objectimplements 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
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic final void add(T linkable)
add in interface
ListIterator<T extends TLinkable<T>>
linkable - an object of type TLinkable
public final boolean hasNext()
public final boolean hasPrevious()
hasPrevious in interface
ListIterator<T extends TLinkable<T>>
boolean value
public final T next()
public final int nextIndex()
nextIndex in interface
ListIterator<T extends TLinkable<T>>
int value
public final T previous()
previous in interface
ListIterator<T extends TLinkable<T>>
Object value
NoSuchElementException - if there is no previous element.
public final int previousIndex()
previousIndex in interface
ListIterator<T extends TLinkable<T>>
int value
public final void remove()