Class ObjectIterators.UnmodifiableIterator<K>

java.lang.Object
it.unimi.dsi.fastutil.objects.ObjectIterators.UnmodifiableIterator<K>
All Implemented Interfaces:
ObjectIterator<K>, java.util.Iterator<K>
Enclosing class:
ObjectIterators

public static class ObjectIterators.UnmodifiableIterator<K>
extends java.lang.Object
implements ObjectIterator<K>
An unmodifiable wrapper class for iterators.
  • Constructor Summary

    Constructors
    Constructor Description
    UnmodifiableIterator​(ObjectIterator<? extends K> i)  
  • Method Summary

    Modifier and Type Method Description
    void forEachRemaining​(java.util.function.Consumer<? super K> action)  
    boolean hasNext()  
    K next()  

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.Iterator

    remove

    Methods inherited from interface it.unimi.dsi.fastutil.objects.ObjectIterator

    skip
  • Constructor Details

    • UnmodifiableIterator

      public UnmodifiableIterator​(ObjectIterator<? extends K> i)
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface java.util.Iterator<K>
    • next

      public K next()
      Specified by:
      next in interface java.util.Iterator<K>
    • forEachRemaining

      public void forEachRemaining​(java.util.function.Consumer<? super K> action)
      Specified by:
      forEachRemaining in interface java.util.Iterator<K>