base/common/src/main/com/thesett/common/util/SequenceIterator.java
public E next()
    {
        // Consume the next element in the sequence, if one is available.
        E result = nextInternal();

        if (exhausted)
        {
            throw new NoSuchElementException();
        }

        nextSolution = null;

        return result;
    }
public E next()
    {
        // Consume the next element in the sequence, if one is available.
        E result = nextInternal();

        if (exhausted)
        {
            throw new NoSuchElementException();
        }

        nextSolution = null;

        return result;
    }
public E next ( ) { // Consume the next element in the sequence, if one is available. E result = nextInternal ( ) ; if ( exhausted ) { throw new NoSuchElementException ( ) ; } nextSolution = null ; return result ; }
Gets the next element from the sequence if one is available. The difference between this method and
{@link #nextInSequence} is that this method consumes any cached solution, so subsequent calls advance onto
subsequent solutions.

@return The next solution from the search space if one is available.

@throws NoSuchElementException If no solutions are available.
Gets the next element from the sequence if one is available . The difference between this method and { @link #nextInSequence } is that this method consumes any cached solution so subsequent calls advance onto subsequent solutions .