Class 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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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
    • Constructor Detail

      • UnmodifiableIterator

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

      • 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>