public WALEntry next() {
    if (!hasNext()) {
      throw new NoSuchElementException();
    }
    WALEntry next = nextEntry;
    nextEntry = null;
    return next;
  }
Like {@link Iterator#next()}.

@throws NoSuchElementException when not calling hasNext before.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/WALReader.java