From 1da9d44a8b70f879bb17b35c242b2d7d645c066d Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 4 Sep 2016 19:45:16 +0100 Subject: [PATCH] Node: add javadoc @deprecated to findOrCreateChild --- src/main/java/net/kemitix/node/Node.java | 3 +++ src/main/java/net/kemitix/node/NodeItem.java | 3 +++ 2 files changed, 6 insertions(+) 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