From f945af160a6ac2b688c70e86d079bc727195e055 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 21 Aug 2016 11:29:42 +0100 Subject: [PATCH] NodeItem: deprecate dynamic node names With the aim of moving towards immutable objects, node shouldn't have dynamic names. I've not found a use for them in my own projects. --- src/main/java/net/kemitix/node/NodeItem.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/net/kemitix/node/NodeItem.java b/src/main/java/net/kemitix/node/NodeItem.java index ec71f11..899bf5c 100644 --- a/src/main/java/net/kemitix/node/NodeItem.java +++ b/src/main/java/net/kemitix/node/NodeItem.java @@ -52,7 +52,10 @@ public class NodeItem implements Node { * * @param data the data or null * @param nameSupplier the name supplier function + * + * @deprecated dynamic names don't work on immutable objects */ + @Deprecated public NodeItem( final T data, final Function, String> nameSupplier) { this(data); @@ -89,7 +92,10 @@ public class NodeItem implements Node { * @param data the data or null * @param nameSupplier the name supplier function * @param parent the parent node + * + * @deprecated dynamic names don't work on immutable objects */ + @Deprecated public NodeItem( final T data, final Function, String> nameSupplier, final Node parent) {