Class SkipIterator<T>

    • Constructor Detail

      • SkipIterator

        public SkipIterator​(Iterator<T> iterator)
    • Method Detail

      • skip

        public long skip​(long skipNum)
        Attempts to skip a number of elements
        Parameters:
        skipNum - number of elements to skip
        Returns:
        long value with the number of elements that were actually skipped
      • getPosition

        public long getPosition()
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface Iterator<T>
      • next

        public T next()
        Specified by:
        next in interface Iterator<T>
      • remove

        public void remove()
        Specified by:
        remove in interface Iterator<T>