/** @return False if the value does not match the range, otherwise true. */
  @SuppressWarnings("unchecked")
  private boolean readValue(int pin, long pos, PhEntry<T> result) {
    Object o = node.checkAndGetEntryPIN(pin, pos, valTemplate, result.getKey(), rangeMin, rangeMax);
    if (o == null) {
      return false;
    }

    if (o instanceof Node) {
      Node sub = (Node) o;
      // skip this for postLen>=63
      if (checker != null
          && sub.getPostLen() < (PhTree11.DEPTH_64 - 1)
          && !checker.isValid(sub.getPostLen() + 1, valTemplate)) {
        return false;
      }
      result.setNodeInternal(sub);
      return true;
    }

    if (checker != null && !checker.isValid(result.getKey())) {
      return false;
    }
    result.setValueInternal((T) o);
    return true;
  }
  private boolean readValue(long pos, Object value, PhEntry<T> result) {
    if (!node.checkAndGetEntryNt(pos, value, result, valTemplate, rangeMin, rangeMax)) {
      return false;
    }

    // subnode ?
    if (value instanceof Node) {
      Node sub = (Node) value;
      // skip this for postLen>=63
      if (checker != null
          && sub.getPostLen() < (PhTree11.DEPTH_64 - 1)
          && !checker.isValid(sub.getPostLen() + 1, valTemplate)) {
        return false;
      }
      return true;
    }

    return checker == null || checker.isValid(result.getKey());
  }