Package it.unimi.dsi.fastutil.ints
Class IntIterators.UnmodifiableBidirectionalIterator
- java.lang.Object
-
- it.unimi.dsi.fastutil.ints.IntIterators.UnmodifiableBidirectionalIterator
-
- All Implemented Interfaces:
BidirectionalIterator<Integer>
,IntBidirectionalIterator
,IntIterator
,ObjectBidirectionalIterator<Integer>
,ObjectIterator<Integer>
,Iterator<Integer>
,PrimitiveIterator<Integer,IntConsumer>
,PrimitiveIterator.OfInt
- Enclosing class:
- IntIterators
public static class IntIterators.UnmodifiableBidirectionalIterator extends Object implements IntBidirectionalIterator
An unmodifiable wrapper class for bidirectional iterators.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface java.util.PrimitiveIterator
PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong
-
-
Constructor Summary
Constructors Constructor Description UnmodifiableBidirectionalIterator(IntBidirectionalIterator 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.int
nextInt()
Returns the next element as a primitive type.int
previousInt()
Returns the previous element as a primitive type.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface it.unimi.dsi.fastutil.ints.IntBidirectionalIterator
back, previous, skip
-
Methods inherited from interface it.unimi.dsi.fastutil.ints.IntIterator
forEachRemaining, next
-
Methods inherited from interface java.util.PrimitiveIterator.OfInt
forEachRemaining
-
-
-
-
Constructor Detail
-
UnmodifiableBidirectionalIterator
public UnmodifiableBidirectionalIterator(IntBidirectionalIterator i)
-
-
Method Detail
-
hasPrevious
public boolean hasPrevious()
Description copied from interface:BidirectionalIterator
Returns whether there is a previous element.- Specified by:
hasPrevious
in interfaceBidirectionalIterator<Integer>
- Returns:
- whether there is a previous element.
- See Also:
ListIterator.hasPrevious()
-
nextInt
public int nextInt()
Description copied from interface:IntIterator
Returns the next element as a primitive type.- Specified by:
nextInt
in interfaceIntIterator
- Specified by:
nextInt
in interfacePrimitiveIterator.OfInt
- Returns:
- the next element in the iteration.
- See Also:
Iterator.next()
-
previousInt
public int previousInt()
Description copied from interface:IntBidirectionalIterator
Returns the previous element as a primitive type.- Specified by:
previousInt
in interfaceIntBidirectionalIterator
- Returns:
- the previous element in the iteration.
- See Also:
ListIterator.previous()
-
-