base/common/src/main/com/thesett/common/util/Filterator.java
public T nextInSequence()
    {
        T result = null;

        // Loop until a filtered element is found, or the source iterator is exhausted.
        while (source.hasNext())
        {
            S next = source.next();
            result = mapping.apply(next);

            if (result != null)
            {
                break;
            }
        }

        return result;
    }
public T nextInSequence()
    {
        T result = null;

        // Loop until a filtered element is found, or the source iterator is exhausted.
        while (source.hasNext())
        {
            S next = source.next();
            result = mapping.apply(next);

            if (result != null)
            {
                break;
            }
        }

        return result;
    }
Generates the next element in the sequence.

@return The next element from the sequence if one is available, or <tt>null</tt> if the sequence is complete.