Package com.vaadin.signals
Class NodeSignal.NodeSignalState
java.lang.Object
com.vaadin.signals.NodeSignal.NodeSignalState
- Enclosing class:
NodeSignal
The snapshot of the state of a node signal. Gives access to the value and
child nodes.
-
Constructor Summary
ConstructorsConstructorDescriptionNodeSignalState(tools.jackson.databind.JsonNode value, NodeSignal parent, List<NodeSignal> listChildren, Map<String, NodeSignal> mapChildren) Creates a new state snapshot based on the given JSON value, list children and map children. -
Method Summary
Modifier and TypeMethodDescriptionGets a list with the children accessed by order.Gets a map of the children accessed by key.parent()Gets the parent node of this signal.<T> TGets the value as the given type.
-
Constructor Details
-
NodeSignalState
public NodeSignalState(tools.jackson.databind.JsonNode value, NodeSignal parent, List<NodeSignal> listChildren, Map<String, NodeSignal> mapChildren) Creates a new state snapshot based on the given JSON value, list children and map children.- Parameters:
value- the JSON value, ornullif there is no valueparent- the parent node, nornullfor the value of the root nodelistChildren- a list of children accessed by order, or an empty list if there are no list children. Notnull.mapChildren- a map of children access by key, or an empty map if there are no map children. Notnull.
-
-
Method Details
-
value
Gets the value as the given type.- Type Parameters:
T- the value type- Parameters:
valueType- the value type, notnull- Returns:
- the value, or
nullif there is no value
-
parent
Gets the parent node of this signal.- Returns:
- the parent node, or
nullfor the root node
-
listChildren
Gets a list with the children accessed by order.- Returns:
- a list of children, not
null
-
mapChildren
Gets a map of the children accessed by key.- Returns:
- a map of children, not
null
-