Package it.unimi.dsi.fastutil.ints
Class IntIterators.UnmodifiableIterator
java.lang.Object
it.unimi.dsi.fastutil.ints.IntIterators.UnmodifiableIterator
- All Implemented Interfaces:
IntIterator,java.util.Iterator<java.lang.Integer>,java.util.PrimitiveIterator<java.lang.Integer,java.util.function.IntConsumer>,java.util.PrimitiveIterator.OfInt
- Enclosing class:
- IntIterators
public static class IntIterators.UnmodifiableIterator extends java.lang.Object implements IntIterator
An unmodifiable wrapper class for iterators.
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.PrimitiveIterator
java.util.PrimitiveIterator.OfDouble, java.util.PrimitiveIterator.OfInt, java.util.PrimitiveIterator.OfLong -
Constructor Summary
Constructors Constructor Description UnmodifiableIterator(IntIterator i) -
Method Summary
Modifier and Type Method Description voidforEachRemaining(java.util.function.Consumer<? super java.lang.Integer> action)Deprecated.voidforEachRemaining(java.util.function.IntConsumer action)booleanhasNext()intnextInt()Returns the next element as a primitive type.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface it.unimi.dsi.fastutil.ints.IntIterator
forEachRemaining, next, skipMethods inherited from interface java.util.Iterator
remove
-
Constructor Details
-
UnmodifiableIterator
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfacejava.util.Iterator<java.lang.Integer>
-
nextInt
public int nextInt()Description copied from interface:IntIteratorReturns the next element as a primitive type.- Specified by:
nextIntin interfaceIntIterator- Specified by:
nextIntin interfacejava.util.PrimitiveIterator.OfInt- Returns:
- the next element in the iteration.
- See Also:
Iterator.next()
-
forEachRemaining
public void forEachRemaining(java.util.function.IntConsumer action)- Specified by:
forEachRemainingin interfacejava.util.PrimitiveIterator<java.lang.Integer,java.util.function.IntConsumer>- Specified by:
forEachRemainingin interfacejava.util.PrimitiveIterator.OfInt
-
forEachRemaining
@Deprecated public void forEachRemaining(java.util.function.Consumer<? super java.lang.Integer> action)Deprecated.Description copied from interface:IntIterator- Specified by:
forEachRemainingin interfaceIntIterator- Specified by:
forEachRemainingin interfacejava.util.Iterator<java.lang.Integer>- Specified by:
forEachRemainingin interfacejava.util.PrimitiveIterator.OfInt
-