public static class ObjectIterators.EmptyIterator<K> extends java.lang.Object implements ObjectListIterator<K>, java.io.Serializable, java.lang.Cloneable
This class may be useful to implement your own in case you subclass a type-specific iterator.
| Modifier and Type | Method and Description |
|---|---|
int |
back(int n)
Moves back for the given number of elements.
|
java.lang.Object |
clone() |
boolean |
hasNext() |
boolean |
hasPrevious()
Returns whether there is a previous element.
|
K |
next() |
int |
nextIndex() |
K |
previous()
Returns the previous element from the collection.
|
int |
previousIndex() |
int |
skip(int n)
Skips the given number of elements.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadd, remove, setpublic boolean hasNext()
public boolean hasPrevious()
BidirectionalIteratorhasPrevious in interface BidirectionalIterator<K>hasPrevious in interface java.util.ListIterator<K>ListIterator.hasPrevious()public K next()
public K previous()
BidirectionalIteratorprevious in interface BidirectionalIterator<K>previous in interface java.util.ListIterator<K>ListIterator.previous()public int nextIndex()
nextIndex in interface java.util.ListIterator<K>public int previousIndex()
previousIndex in interface java.util.ListIterator<K>public int skip(int n)
ObjectBidirectionalIterator
The effect of this call is exactly the same as that of calling
Iterator.next() for n times (possibly stopping if Iterator.hasNext()
becomes false).
skip in interface ObjectBidirectionalIterator<K>skip in interface ObjectIterator<K>n - the number of elements to skip.Iterator.next()public int back(int n)
ObjectBidirectionalIterator
The effect of this call is exactly the same as that of calling
BidirectionalIterator.previous() for n times (possibly stopping if
BidirectionalIterator.hasPrevious() becomes false).
back in interface ObjectBidirectionalIterator<K>n - the number of elements to skip back.BidirectionalIterator.previous()public java.lang.Object clone()
clone in class java.lang.Object