public final class LongLinkedList.DescendingValueIterator extends LongLinkedList.ValueIterator
LongLinkedList.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 |
|---|---|
LongLinkedList.DescendingValueIterator |
delete()
Delete the current iterator position, and moves to the next valid
element after this removal, with respect to the forward iteration.
|
protected LongCursor |
fetch()
Fetch next element.
|
long |
getNext()
Get the next element value with respect to the forward iteration,
without moving the iterator.
|
long |
getPrevious()
Get the previous element value with respect to the forward iteration,
|
LongLinkedList.ValueIterator |
gotoHead()
Reset the iterator to the "head", returning itself for chaining.
|
LongLinkedList.DescendingValueIterator |
gotoNext()
Analog to
AbstractIterator.next(), move the iterator to the next element, with respect to the forward iteration,
returning itself for chaining. |
LongLinkedList.DescendingValueIterator |
gotoPrevious()
Move the iterator to the previous element, with respect to the forward iteration,
returning itself for chaining.
|
LongLinkedList.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
LongLinkedList.ValueIterator.hasAfter(), i.e. returns true if there is an element before the current position,
with respect to the forward iteration. |
void |
insertAfter(long e1)
Insert e1 after the iterator position, without moving the iterator.
|
void |
insertBefore(long e1)
Insert e1 before the iterator position, without moving the iterator.
|
long |
removeNext()
Removes the next element, without moving the iterator.
|
long |
removePrevious()
Removes the previous element, without moving the iterator.
|
setdone, hasNext, next, release, removeprotected LongCursor fetch()
AbstractIteratorAbstractIterator.done() when all elements have been
fetched.fetch in class LongLinkedList.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 LongLinkedList.ValueIteratorLongLinkedList.ValueIterator.hasBefore()public boolean hasBefore()
LongLinkedList.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 LongLinkedList.ValueIteratorLongLinkedList.ValueIterator.hasAfter()public LongLinkedList.ValueIterator gotoHead()
gotoHead in class LongLinkedList.ValueIteratorpublic LongLinkedList.DescendingValueIterator gotoTail()
gotoTail in class LongLinkedList.ValueIteratorpublic LongLinkedList.DescendingValueIterator gotoNext()
AbstractIterator.next(), move the iterator to the next element, with respect to the forward iteration,
returning itself for chaining.gotoNext in class LongLinkedList.ValueIteratorpublic LongLinkedList.DescendingValueIterator gotoPrevious()
gotoPrevious in class LongLinkedList.ValueIteratorpublic long getNext()
getNext in class LongLinkedList.ValueIteratorpublic long getPrevious()
getPrevious in class LongLinkedList.ValueIteratorpublic long removeNext()
removeNext in class LongLinkedList.ValueIteratorpublic long removePrevious()
removePrevious in class LongLinkedList.ValueIteratorpublic void insertBefore(long e1)
insertBefore in class LongLinkedList.ValueIteratorpublic void insertAfter(long e1)
insertAfter in class LongLinkedList.ValueIteratorpublic LongLinkedList.DescendingValueIterator delete()
delete in class LongLinkedList.ValueIteratorjava.lang.IndexOutOfBoundsException - if delete is impossible, because we are pointing
either at head or tail.Copyright © 2017. All rights reserved.