public interface ObjectBidirectionalIterator<K> extends ObjectIterator<K>, BidirectionalIterator<K>
BidirectionalIterator
Modifier and Type | Method and Description |
---|---|
default int |
back(int n)
Moves back for the given number of elements.
|
default int |
skip(int n)
Skips the given number of elements.
|
hasPrevious, previous
default int back(int n)
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).
n
- the number of elements to skip back.BidirectionalIterator.previous()
default int skip(int n)
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 ObjectIterator<K>
n
- the number of elements to skip.Iterator.next()