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
    void forEachRemaining​(java.util.function.Consumer<? super java.lang.Integer> action)
    Deprecated.
    void forEachRemaining​(java.util.function.IntConsumer action)  
    boolean hasNext()  
    int nextInt()
    Returns the next 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.IntIterator

    forEachRemaining, next, skip

    Methods inherited from interface java.util.Iterator

    remove
  • Constructor Details

    • UnmodifiableIterator

      public UnmodifiableIterator​(IntIterator i)
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface java.util.Iterator<java.lang.Integer>
    • nextInt

      public int nextInt()
      Description copied from interface: IntIterator
      Returns the next element as a primitive type.
      Specified by:
      nextInt in interface IntIterator
      Specified by:
      nextInt in interface java.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:
      forEachRemaining in interface java.util.PrimitiveIterator<java.lang.Integer,​java.util.function.IntConsumer>
      Specified by:
      forEachRemaining in interface java.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:
      forEachRemaining in interface IntIterator
      Specified by:
      forEachRemaining in interface java.util.Iterator<java.lang.Integer>
      Specified by:
      forEachRemaining in interface java.util.PrimitiveIterator.OfInt