public final class ShortLinkedList.DescendingValueIterator extends ShortLinkedList.ValueIterator
ShortLinkedList.descendingIterator()s.
Important: NEVER USE java.util.Iterator methods directly, only use the specialized methods instead !Iterator.hasNext()andIterator.next()are only for enhanced-loop support, using them directly will lead to unpredictable results !
cursor| Constructor and Description |
|---|
DescendingValueIterator() |
| Modifier and Type | Method and Description |
|---|---|
ShortLinkedList.DescendingValueIterator |
delete()
Delete the current iterator position, and moves to the next valid
element after this removal, with respect to the forward iteration.
|
protected ShortCursor |
fetch()
Fetch next element.
|
short |
getNext()
Get the next element value with respect to the forward iteration,
without moving the iterator.
|
short |
getPrevious()
Get the previous element value with respect to the forward iteration,
|
ShortLinkedList.ValueIterator |
gotoHead()
Reset the iterator to the "head", returning itself for chaining.
|
ShortLinkedList.DescendingValueIterator |
gotoNext()
Analog to
AbstractIterator.next(), move the iterator to the next element, with respect to the forward iteration,
returning itself for chaining. |
ShortLinkedList.DescendingValueIterator |
gotoPrevious()
Move the iterator to the previous element, with respect to the forward iteration,
returning itself for chaining.
|
ShortLinkedList.DescendingValueIterator |
gotoTail()
Reset the iterator to the "tail", returning itself for chaining.
|
boolean |
hasAfter()
Analog to
AbstractIterator.hasNext(), returns true if there is an element after the current position,
with respect to the forward iteration. |
boolean |
hasBefore()
Inverse of
ShortLinkedList.ValueIterator.hasAfter(), i.e. returns true if there is an element before the current position,
with respect to the forward iteration. |
void |
insertAfter(short e1)
Insert e1 after the iterator position, without moving the iterator.
|
void |
insertBefore(short e1)
Insert e1 before the iterator position, without moving the iterator.
|
short |
removeNext()
Removes the next element, without moving the iterator.
|
short |
removePrevious()
Removes the previous element, without moving the iterator.
|
setdone, hasNext, next, release, removeprotected ShortCursor fetch()
AbstractIteratorAbstractIterator.done() when all elements have been
fetched.fetch in class ShortLinkedList.ValueIteratorpublic boolean hasAfter()
AbstractIterator.hasNext(), returns true if there is an element after the current position,
with respect to the forward iteration. Always false if the list is empty. (i.e no next element)hasAfter in class ShortLinkedList.ValueIteratorShortLinkedList.ValueIterator.hasBefore()public boolean hasBefore()
ShortLinkedList.ValueIterator.hasAfter(), i.e. returns true if there is an element before the current position,
with respect to the forward iteration. Always false if the list is empty. (i.e no previous element)hasBefore in class ShortLinkedList.ValueIteratorShortLinkedList.ValueIterator.hasAfter()public ShortLinkedList.ValueIterator gotoHead()
gotoHead in class ShortLinkedList.ValueIteratorpublic ShortLinkedList.DescendingValueIterator gotoTail()
gotoTail in class ShortLinkedList.ValueIteratorpublic ShortLinkedList.DescendingValueIterator gotoNext()
AbstractIterator.next(), move the iterator to the next element, with respect to the forward iteration,
returning itself for chaining.gotoNext in class ShortLinkedList.ValueIteratorpublic ShortLinkedList.DescendingValueIterator gotoPrevious()
gotoPrevious in class ShortLinkedList.ValueIteratorpublic short getNext()
getNext in class ShortLinkedList.ValueIteratorpublic short getPrevious()
getPrevious in class ShortLinkedList.ValueIteratorpublic short removeNext()
removeNext in class ShortLinkedList.ValueIteratorpublic short removePrevious()
removePrevious in class ShortLinkedList.ValueIteratorpublic void insertBefore(short e1)
insertBefore in class ShortLinkedList.ValueIteratorpublic void insertAfter(short e1)
insertAfter in class ShortLinkedList.ValueIteratorpublic ShortLinkedList.DescendingValueIterator delete()
delete in class ShortLinkedList.ValueIteratorjava.lang.IndexOutOfBoundsException - if delete is impossible, because we are pointing
either at head or tail.Copyright © 2017. All rights reserved.