Interface MarkResetIterator<T>

    • Method Detail

      • mark

        void mark​(T element)
        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.
        Parameters:
        element - the element to serve as a mark
      • resetToMark

        void resetToMark()
        Rewinds the position of the iterator to the previously marked element.
        Throws:
        java.util.NoSuchElementException - if there's no mark