Class MarkResetSkippingIterator<T>

    • Constructor Detail

      • MarkResetSkippingIterator

        public MarkResetSkippingIterator​(SkippingIterator<T> theIterator)
    • Method Detail

      • computeSkipTo

        protected T computeSkipTo​(T theTarget)
        Description copied from class: AbstractSkippingIterator
        Returns the element that this iteration has skipped to or null if it ran off the end.
        Specified by:
        computeSkipTo in class AbstractSkippingIterator<T>
        Parameters:
        theTarget - the skipping target
        Returns:
        the first element that is greater or equal to the skipping target, or null if it doesn't exist.
      • mark

        public void mark​(T element)
        Description copied from interface: MarkResetIterator
        Creates a mark from the provided element. Note: the reset-to-mark behavior is only guaranteed if the mark is a part of the iterator's output. Specific implementations may impose other restrictions, for example, on the mark being ahead or behind the current iterator's position.
        Specified by:
        mark in interface MarkResetIterator<T>
        Parameters:
        element - the element to serve as a mark
      • copy

        public MarkResetSkippingIterator<T> copy()
        Description copied from interface: Copyable
        Create a deep copy of the object which does not share any references with the original.
        Specified by:
        copy in interface Copyable<T>
        Returns:
        a copy of the object