@Override
    public T next() {
        if (this.iterators.isEmpty()) throw FastNoSuchElementException.instance();

        Iterator<T> currentIterator = iterators.get(this.current);

        while (true) {
            if (currentIterator.hasNext()) {
                this.counter++;
                return currentIterator.next();
            } else {
                this.current++;
                if (this.current >= iterators.size() || !checks.get(current).test(counter))
                    break;
                currentIterator = iterators.get(current);
            }
        }
        throw FastNoSuchElementException.instance();
    }
Adds an {@code Iterator} that will iterate only if the {@code check} passes.

@param check when returning {@code true} processing of the associated {@code Iterator} will proceed
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/iterator/AbortiveMultiIterator.java