Class ObjectIterators.UnmodifiableBidirectionalIterator<K>
- java.lang.Object
-
- org.codelibs.jhighlight.fastutil.objects.AbstractObjectIterator<K>
-
- org.codelibs.jhighlight.fastutil.objects.AbstractObjectBidirectionalIterator<K>
-
- org.codelibs.jhighlight.fastutil.objects.ObjectIterators.UnmodifiableBidirectionalIterator<K>
-
- All Implemented Interfaces:
Iterator<K>
,BidirectionalIterator<K>
,ObjectBidirectionalIterator<K>
,ObjectIterator<K>
- Enclosing class:
- ObjectIterators
public static class ObjectIterators.UnmodifiableBidirectionalIterator<K> extends AbstractObjectBidirectionalIterator<K>
An unmodifiable wrapper class for bidirectional iterators.
-
-
Field Summary
Fields Modifier and Type Field Description protected ObjectBidirectionalIterator<K>
i
-
Constructor Summary
Constructors Constructor Description UnmodifiableBidirectionalIterator(ObjectBidirectionalIterator<K> i)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
boolean
hasPrevious()
Returns whether there is a previous element.K
next()
K
previous()
Returns the previous element from the collection.-
Methods inherited from class org.codelibs.jhighlight.fastutil.objects.AbstractObjectBidirectionalIterator
back
-
Methods inherited from class org.codelibs.jhighlight.fastutil.objects.AbstractObjectIterator
remove, skip
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Methods inherited from interface org.codelibs.jhighlight.fastutil.objects.ObjectIterator
skip
-
-
-
-
Field Detail
-
i
protected final ObjectBidirectionalIterator<K> i
-
-
Constructor Detail
-
UnmodifiableBidirectionalIterator
public UnmodifiableBidirectionalIterator(ObjectBidirectionalIterator<K> i)
-
-
Method Detail
-
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()
-
-