diff --git a/src/main/java/net/kemitix/node/Node.java b/src/main/java/net/kemitix/node/Node.java index f1fa7ba..395ebb7 100644 --- a/src/main/java/net/kemitix/node/Node.java +++ b/src/main/java/net/kemitix/node/Node.java @@ -113,6 +113,9 @@ public interface Node { * @param child the child's data to search or create with * * @return the found or created child node + * + * @deprecated use node.findChild(child).orElseGet(() -> + * node.createChild(child)); */ @Deprecated Node findOrCreateChild(T child); diff --git a/src/main/java/net/kemitix/node/NodeItem.java b/src/main/java/net/kemitix/node/NodeItem.java index 6c5f241..c41a3d7 100644 --- a/src/main/java/net/kemitix/node/NodeItem.java +++ b/src/main/java/net/kemitix/node/NodeItem.java @@ -191,6 +191,9 @@ class NodeItem implements Node { * @param child the child's data to search or create with * * @return the found or created child node + * + * @deprecated use node.findChild(child).orElseGet(() -> node.createChild + * (child)); */ @Override @Deprecated