コード例 #1
0
  public KeyTreeNode update(String prefix) {

    KeyTreeNode root = new KeyTreeNode(value, isLeave, isDeleted, isArray);
    if (this.getAlterKey() != null) {
      root.setAlterKey(this.alterKey.updateKey(prefix));
    }

    this.getChildren()
        .forEach(
            (key, childNode) -> {
              KeyTreeNode childRoot = childNode.update(prefix);
              root.getChildren().put(key, childRoot);
            });

    return root;
  }
コード例 #2
0
  public void addChild(KeyTreeNode child) {

    children.put(child.getValue(), child);
  }