Class RangeIteratorDecorator

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getPosition()
      Delegated to the underlying iterator.
      long getSize()
      Delegated to the underlying iterator.
      boolean hasNext()
      Delegated to the underlying iterator.
      java.lang.Object next()
      Delegated to the underlying iterator.
      void remove()
      Delegated to the underlying iterator.
      void skip​(long n)
      Delegated to the underlying iterator.
      • Methods inherited from class java.lang.Object

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

        forEachRemaining
    • Method Detail

      • getPosition

        public long getPosition()
        Delegated to the underlying iterator.
        Specified by:
        getPosition in interface RangeIterator
        Returns:
        iterator position
      • getSize

        public long getSize()
        Delegated to the underlying iterator.
        Specified by:
        getSize in interface RangeIterator
        Returns:
        iterator size
      • skip

        public void skip​(long n)
                  throws java.util.NoSuchElementException
        Delegated to the underlying iterator.
        Specified by:
        skip in interface RangeIterator
        Parameters:
        n - number of elements to skip
        Throws:
        java.util.NoSuchElementException - if skipped past the last element
      • hasNext

        public boolean hasNext()
        Delegated to the underlying iterator.
        Specified by:
        hasNext in interface java.util.Iterator
        Returns:
        true if the iterator has more elements, false otherwise
      • next

        public java.lang.Object next()
                              throws java.util.NoSuchElementException
        Delegated to the underlying iterator.
        Specified by:
        next in interface java.util.Iterator
        Returns:
        next element
        Throws:
        java.util.NoSuchElementException - if there are no more elements
      • remove

        public void remove()
                    throws java.lang.UnsupportedOperationException,
                           java.lang.IllegalStateException
        Delegated to the underlying iterator.
        Specified by:
        remove in interface java.util.Iterator
        Throws:
        java.lang.UnsupportedOperationException - if the operation is not supported
        java.lang.IllegalStateException - if there is no element to be removed