protected final class TLinkedList.IteratorImpl extends Object implements ListIterator
| Modifier and Type | Method and Description |
|---|---|
void |
add(Object 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.
|
Object |
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()).
|
Object |
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(Object linkable)
Replaces the current element in the list with
linkable
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic final void add(Object linkable)
add in interface ListIteratorlinkable - an object of type TLinkablepublic final boolean hasNext()
hasNext in interface IteratorhasNext in interface ListIteratorboolean valuepublic final boolean hasPrevious()
hasPrevious in interface ListIteratorboolean valuepublic final Object next()
next in interface Iteratornext in interface ListIteratorObject valueNoSuchElementException - if there is no next elementpublic final int nextIndex()
nextIndex in interface ListIteratorint valuepublic final Object previous()
previous in interface ListIteratorObject valueNoSuchElementException - if there is no previous element.public final int previousIndex()
previousIndex in interface ListIteratorint valuepublic final void remove()
remove in interface Iteratorremove in interface ListIteratorIllegalStateException - neither next nor previous
have been invoked, or remove or add have been invoked after
the last invocation of next or previous.public final void set(Object linkable)
set in interface ListIteratorlinkable - an object of type TLinkableCopyright © 2019 JULIE Lab, Germany. All rights reserved.