class MarkableIterator implements Iterator<T> {

    public void reset() {
        if (state == State.READ) {
            throw new IllegalStateException("Iterator has not been marked or the mark has been invalidated");
        }
        replayIterator = replayBuffer.iterator();
        state = State.REPLAY;
    }

    public  MarkableIterator(Iterator<T> backingIterator);

}