private Boolean maybeComputeNext() {
        state = State.FAILED;
        next = makeNext();
        if (state == State.DONE) {
            return false;
        } else {
            state = State.READY;
            return true;
        }
    }
A base class that simplifies implementing an iterator
@param <T> The type of thing we are iterating over
clients/src/main/java/org/apache/kafka/common/utils/AbstractIterator.java