Class DelegatingSkippingIterator<T>

    • Constructor Detail

      • DelegatingSkippingIterator

        public DelegatingSkippingIterator​(SkippingIterator<T> it)
    • Method Detail

      • reset

        public void reset()
        Description copied from interface: ResettableIterator
        Resets the iterator to the beginning so the following Iterator.next() call will return the first element in this iteration.
        Specified by:
        reset in interface ResettableIterator<T>
      • close

        public void close()
                   throws java.lang.RuntimeException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface CloseableIterator<T>
        Throws:
        java.lang.RuntimeException
      • skipTo

        public T skipTo​(T e)
        Description copied from interface: SkippingIterator
        Returns the element which is equal or greater to theElement based on the ordering of the elements in the underlying data source, i.e., for two elements A, B s.t. B comes after A during iteration, theComparator should return A <= B. Note that skips are always in the forward direction. if theElement compares to less than the last returned element (or less than the bounding start of the iterator), then no skip will occur, and the returned value is the same as if `next()` was called.
        Specified by:
        skipTo in interface SkippingIterator<T>
        Returns:
        the smallest element A s.t. A <= theElement, if theElement > last seen element, or the output of next() if not.
      • comparator

        public java.util.Comparator<T> comparator()
        Description copied from interface: SkippingIterator
        Returns the comparator for this iterator that specifies the order in which the elements are returned.
        Specified by:
        comparator in interface SkippingIterator<T>
      • estimatedSize

        public long estimatedSize()
        Description copied from interface: SkippingIterator
        Returns the estimated size of this iterator without advancing the iterator or SkippingIterator.UNKNOWN_SIZE if the estimate is not known. The estimate is for the whole iterator and will not change after the iterator is advanced. There is no guarantee about the accuracy of the estimate.
        Specified by:
        estimatedSize in interface SkippingIterator<T>
      • hasNext

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

        public T next()
        Specified by:
        next in interface java.util.Iterator<T>