@Override
  public final boolean hasNext() {
    switch (state) {
      case DONE:
        return false;
      case READY:
        return true;
      default:
    }
    return tryToComputeNext();
  }
adapted from guava's {@code com.google.common.collect.AbstractIterator}.
zipkin-storage/mysql-v1/src/main/java/zipkin2/storage/mysql/v1/PeekingIterator.java