Class DroppingIterator<A>

  • All Implemented Interfaces:
    java.util.Iterator<A>

    public final class DroppingIterator<A>
    extends ImmutableIterator<A>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Iterator<A> asIterator  
      private boolean dropped  
      private java.lang.Integer n  
    • Constructor Summary

      Constructors 
      Constructor Description
      DroppingIterator​(java.lang.Integer n, java.util.Iterator<A> asIterator)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void drop()  
      boolean hasNext()  
      A next()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Field Detail

      • n

        private final java.lang.Integer n
      • asIterator

        private final java.util.Iterator<A> asIterator
      • dropped

        private boolean dropped
    • Constructor Detail

      • DroppingIterator

        public DroppingIterator​(java.lang.Integer n,
                                java.util.Iterator<A> asIterator)
    • Method Detail

      • hasNext

        public boolean hasNext()
      • next

        public A next()
      • drop

        private void drop()