public static class LongIterators.EmptyIterator extends Object implements LongListIterator, Serializable, Cloneable
This class may be useful to implement your own in case you subclass a type-specific iterator.
PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong| Modifier and Type | Method and Description |
|---|---|
int |
back(int n)
Moves back for the given number of elements.
|
Object |
clone() |
boolean |
hasNext() |
boolean |
hasPrevious()
Returns whether there is a previous element.
|
int |
nextIndex() |
long |
nextLong()
Returns the next element as a primitive type.
|
int |
previousIndex() |
long |
previousLong()
Returns the previous element as a primitive type.
|
int |
skip(int n)
Skips the given number of elements.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadd, add, next, previous, remove, set, setforEachRemainingforEachRemainingpublic boolean hasNext()
public boolean hasPrevious()
BidirectionalIteratorhasPrevious in interface BidirectionalIterator<Long>hasPrevious in interface ListIterator<Long>ListIterator.hasPrevious()public long nextLong()
LongIteratornextLong in interface LongIteratornextLong in interface PrimitiveIterator.OfLongIterator.next()public long previousLong()
LongBidirectionalIteratorpreviousLong in interface LongBidirectionalIteratorListIterator.previous()public int nextIndex()
nextIndex in interface ListIterator<Long>public int previousIndex()
previousIndex in interface ListIterator<Long>public int skip(int n)
LongBidirectionalIteratorThe effect of this call is exactly the same as that of calling LongIterator.next() for n times (possibly stopping if Iterator.hasNext() becomes false).
skip in interface LongBidirectionalIteratorskip in interface LongIteratorskip in interface ObjectBidirectionalIterator<Long>skip in interface ObjectIterator<Long>n - the number of elements to skip.Iterator.next()public int back(int n)
LongBidirectionalIteratorThe effect of this call is exactly the same as that of
calling LongBidirectionalIterator.previous() for n times (possibly stopping
if BidirectionalIterator.hasPrevious() becomes false).
back in interface LongBidirectionalIteratorback in interface ObjectBidirectionalIterator<Long>n - the number of elements to skip back.LongBidirectionalIterator.previous()