Interface EnumeratingIterator<T>

  • Type Parameters:
    T - type
    All Superinterfaces:
    Iterator<List<T>>

    public interface EnumeratingIterator<T>
    extends Iterator<List<T>>
    An iterator extending Iterator providing the ability to skip a certain prefix.
    • Method Detail

      • skip

        void skip​(int level)
        Instructs the iterator to advance to the next possible ordering using the given zero-indexed level. Example 1: Consider the last returned ordering of the iterator it is (e0, e1, e2, e3). If it.skip(1) is called, the state of the iterator is advanced in a way that it either
        • reaches the end of iteration and a subsequent call to it.hasNext() returns false or
        • the item being returned upon a subsequent call to it.next() denoted as (e0', e1', e2', e3') is the next item occurring in the enumeration where (e0', e1') is greater than (e0, e1).
        Example 2: Consider the last returned ordering of the iterator it is (e0, e1, e2, e3). If it.skip(2) is called, the state of the iterator is advanced in a way that it either
        • reaches the end of iteration and a subsequent call to it.hasNext() returns false or
        • the item being returned upon a subsequent call to it.next() denoted as (e0', e1', e2', e3') is the next item occurring in the enumeration where (e0', e1', e2') is greater than (e0, e1, e2).
        Parameters:
        level - skip level