BidirectionalIterator<K>, ObjectBidirectionalIterator<K>, ObjectIterator<K>, java.util.Iterator<K>AbstractObjectListIterator, ObjectIterators.UnmodifiableBidirectionalIteratorpublic abstract class AbstractObjectBidirectionalIterator<K> extends AbstractObjectIterator<K> implements ObjectBidirectionalIterator<K>
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 |
AbstractObjectBidirectionalIterator() |
| Modifier and Type | Method | Description |
|---|---|---|
int |
back(int n) |
This method just iterates the type-specific version of
BidirectionalIterator.previous() for at most n times, stopping if
BidirectionalIterator.hasPrevious() becomes false. |
remove, skiphasPrevious, previousclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitskipprotected AbstractObjectBidirectionalIterator()
public int back(int n)
BidirectionalIterator.previous() for at most n times, stopping if
BidirectionalIterator.hasPrevious() becomes false.back in interface ObjectBidirectionalIterator<K>n - the number of elements to skip back.Iterator.next()