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.
This commit is contained in:
Paul Campbell 2016-08-21 11:29:42 +01:00
parent 5eb4090acf
commit f945af160a

View file

@ -52,7 +52,10 @@ public class NodeItem<T> implements Node<T> {
* *
* @param data the data or null * @param data the data or null
* @param nameSupplier the name supplier function * @param nameSupplier the name supplier function
*
* @deprecated dynamic names don't work on immutable objects
*/ */
@Deprecated
public NodeItem( public NodeItem(
final T data, final Function<Node<T>, String> nameSupplier) { final T data, final Function<Node<T>, String> nameSupplier) {
this(data); this(data);
@ -89,7 +92,10 @@ public class NodeItem<T> implements Node<T> {
* @param data the data or null * @param data the data or null
* @param nameSupplier the name supplier function * @param nameSupplier the name supplier function
* @param parent the parent node * @param parent the parent node
*
* @deprecated dynamic names don't work on immutable objects
*/ */
@Deprecated
public NodeItem( public NodeItem(
final T data, final Function<Node<T>, String> nameSupplier, final T data, final Function<Node<T>, String> nameSupplier,
final Node<T> parent) { final Node<T> parent) {