public boolean hasNext() {
        if (resultQueue.isEmpty()) {
            populateResults();
        }
        return !resultQueue.isEmpty();
    }
Fills the result queue if necessary and tests if another result is available.

@see Iterator#hasNext()
inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/utils/file/FileFinderIterator.java