protected final boolean fetch()

in hugegraph-common/src/main/java/org/apache/hugegraph/iterator/FlatMapperIterator.java [51:66]


    protected final boolean fetch() {
        if (this.batchIterator != null && this.fetchFromBatch()) {
            return true;
        }

        while (this.originIterator.hasNext()) {
            T next = this.originIterator.next();
            assert this.batchIterator == null;
            // Do fetch
            this.batchIterator = this.mapperCallback.apply(next);
            if (this.batchIterator != null && this.fetchFromBatch()) {
                return true;
            }
        }
        return false;
    }