public static class IntIterators.EmptyIterator extends Object implements IntListIterator, 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() |
int |
nextInt()
Returns the next element as a primitive type.
|
int |
previousIndex() |
int |
previousInt()
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<Integer>hasPrevious in interface ListIterator<Integer>ListIterator.hasPrevious()public int nextInt()
IntIteratornextInt in interface IntIteratornextInt in interface PrimitiveIterator.OfIntIterator.next()public int previousInt()
IntBidirectionalIteratorpreviousInt in interface IntBidirectionalIteratorListIterator.previous()public int nextIndex()
nextIndex in interface ListIterator<Integer>public int previousIndex()
previousIndex in interface ListIterator<Integer>public int skip(int n)
IntBidirectionalIteratorThe effect of this call is exactly the same as that of calling IntIterator.next() for n times (possibly stopping if Iterator.hasNext() becomes false).
skip in interface IntBidirectionalIteratorskip in interface IntIteratorskip in interface ObjectBidirectionalIterator<Integer>skip in interface ObjectIterator<Integer>n - the number of elements to skip.Iterator.next()public int back(int n)
IntBidirectionalIteratorThe effect of this call is exactly the same as that of
calling IntBidirectionalIterator.previous() for n times (possibly stopping
if BidirectionalIterator.hasPrevious() becomes false).
back in interface IntBidirectionalIteratorback in interface ObjectBidirectionalIterator<Integer>n - the number of elements to skip back.IntBidirectionalIterator.previous()