A - The type of the node's ID valueL - The type of the node's metadata labelpublic final class ValueNode<A,L> extends Object implements LabeledNode<A,L>
LabeledNode which is a value object, isomorphic to its value and label| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
L |
getLabel() |
A |
getValue() |
int |
hashCode() |
static <A,L> Fn2<A,L,ValueNode<A,L>> |
labeledNode() |
static <A,L> Fn1<L,ValueNode<A,L>> |
labeledNode(A a) |
static <A,L> ValueNode<A,L> |
labeledNode(A a,
L label)
Create a new node with a provided label
|
static <A,L> Fn2<Node<A>,L,ValueNode<A,L>> |
labelNode() |
static <A,L> Fn1<L,ValueNode<A,L>> |
labelNode(Node<A> node) |
static <A,L> ValueNode<A,L> |
labelNode(Node<A> node,
L label)
Label an existing node.
|
static <A> Fn1<A,ValueNode<A,Unit>> |
node() |
static <A> ValueNode<A,Unit> |
node(A a)
Create a new node with no label
|
String |
toString() |
public static <A> ValueNode<A,Unit> node(A a)
A - The type of the node's ID valuea - The node's ID valueapublic static <A> Fn1<A,ValueNode<A,Unit>> node()
public static <A,L> ValueNode<A,L> labeledNode(A a, L label)
A - The type of the node's ID valueL - The type of the node's metadata labela - The node's ID valuelabel - The node's metadata labela and label labelpublic static <A,L> Fn1<L,ValueNode<A,L>> labeledNode(A a)
public static <A,L> Fn2<A,L,ValueNode<A,L>> labeledNode()
public static <A,L> ValueNode<A,L> labelNode(Node<A> node, L label)
A - The type of the node's ID valueL - The type of the node's metadata labelnode - Node to use for providing an ID valuelabel - The node's metadata labela and label labelpublic L getLabel()
getLabel in interface LabeledNode<A,L>Copyright © 2020. All Rights Reserved.