code: protected boolean toNextKey() throws FetchException {
          byte[] initialKey = getCurrentKey();
          if (initialKey == null) {
              return false;
          }
  
          disableValue();
          try {
              while (true) {
                  if (toNext()) {
                      byte[] currentKey = getCurrentKey();
                      if (currentKey == null) {
                          return false;
                      }
                      if (compareKeysPartially(currentKey, initialKey) > 0) {
                          break;
                      }
                  } else {
                      return false;
                  }
              }
          } finally {
              enableKeyAndValue();
          }
  
          return true;
      }
docs: Move the cursor to the next unique key, returning false if none. If
  false is returned, the cursor must be positioned after the last
  available entry. Subclasses may wish to override this method with a
  faster implementation.
  
  @return true if moved to next unique key
  @throws IllegalStateException if cursor is not opened