it.unimi.dsi.fastutil.objects
Class ObjectIterators.UnmodifiableBidirectionalIterator<K>
java.lang.Object
it.unimi.dsi.fastutil.objects.AbstractObjectIterator<K>
it.unimi.dsi.fastutil.objects.AbstractObjectBidirectionalIterator<K>
it.unimi.dsi.fastutil.objects.ObjectIterators.UnmodifiableBidirectionalIterator<K>
- All Implemented Interfaces:
- BidirectionalIterator<K>, ObjectBidirectionalIterator<K>, ObjectIterator<K>, Iterator<K>
- Enclosing class:
- ObjectIterators
public static class ObjectIterators.UnmodifiableBidirectionalIterator<K>
- extends AbstractObjectBidirectionalIterator<K>
An unmodifiable wrapper class for bidirectional iterators.
Method Summary |
boolean |
hasNext()
|
boolean |
hasPrevious()
Returns whether there is a previous element. |
K |
next()
|
K |
previous()
Returns the previous element from the collection. |
ObjectIterators.UnmodifiableBidirectionalIterator
public ObjectIterators.UnmodifiableBidirectionalIterator(ObjectBidirectionalIterator<K> i)
hasNext
public boolean hasNext()
hasPrevious
public boolean hasPrevious()
- Description copied from interface:
BidirectionalIterator
- Returns whether there is a previous element.
- Returns:
- whether there is a previous element.
- See Also:
ListIterator.hasPrevious()
next
public K next()
previous
public K previous()
- Description copied from interface:
BidirectionalIterator
- Returns the previous element from the collection.
- Returns:
- the previous element from the collection.
- See Also:
ListIterator.previous()