BidirectionalIterator<java.lang.Integer>, IntBidirectionalIterator, IntIterator, ObjectBidirectionalIterator<java.lang.Integer>, ObjectIterator<java.lang.Integer>, java.util.Iterator<java.lang.Integer>AbstractIntListIterator, IntIterators.UnmodifiableBidirectionalIteratorpublic abstract class AbstractIntBidirectionalIterator extends AbstractIntIterator implements IntBidirectionalIterator
To create a type-specific bidirectional iterator, besides what is needed for an iterator you need both a method returning the previous element as primitive type and a method returning the previous element as an object. However, if you inherit from this class you need just one (anyone).
This class implements also a trivial version of back(int) that uses
type-specific methods.
| Modifier | Constructor | Description |
|---|---|---|
protected |
AbstractIntBidirectionalIterator() |
| Modifier and Type | Method | Description |
|---|---|---|
int |
back(int n) |
This method just iterates the type-specific version of
previous() for at most n times, stopping if
BidirectionalIterator.hasPrevious() becomes false. |
java.lang.Integer |
previous() |
Delegates to the corresponding type-specific method.
|
int |
previousInt() |
Delegates to the corresponding generic method.
|
next, nextInt, remove, skiphasPreviousnextInt, skipclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitskippublic int previousInt()
previousInt in interface IntBidirectionalIteratorListIterator.previous()public java.lang.Integer previous()
previous in interface BidirectionalIterator<java.lang.Integer>ListIterator.previous()public int back(int n)
previous() for at most n times, stopping if
BidirectionalIterator.hasPrevious() becomes false.back in interface IntBidirectionalIteratorback in interface ObjectBidirectionalIterator<java.lang.Integer>n - the number of elements to skip back.Iterator.next()