public static class ObjectIterators.UnmodifiableBidirectionalIterator<K> extends Object implements ObjectBidirectionalIterator<K>
| Constructor and Description |
|---|
UnmodifiableBidirectionalIterator(ObjectBidirectionalIterator<K> i) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Returns
true if the iteration has more elements. |
boolean |
hasPrevious()
Returns whether there is a previous element.
|
K |
next()
Returns the next element in the iteration.
|
K |
previous()
Returns the previous element from the collection.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitback, skipforEachRemaining, removepublic UnmodifiableBidirectionalIterator(ObjectBidirectionalIterator<K> i)
public boolean hasNext()
java.util.Iteratortrue if the iteration has more elements.
(In other words, returns true if Iterator.next() would
return an element rather than throwing an exception.)public boolean hasPrevious()
BidirectionalIteratorhasPrevious in interface BidirectionalIterator<K>ListIterator.hasPrevious()public K next()
java.util.Iteratorpublic K previous()
BidirectionalIteratorprevious in interface BidirectionalIterator<K>ListIterator.previous()