Class NodeFeature
- java.lang.Object
-
- com.vaadin.client.flow.nodefeature.NodeFeature
-
-
Constructor Summary
Constructors Constructor Description NodeFeature(int id, StateNode node)Creates a new feature.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract elemental.json.JsonValueconvert(Function<Object,elemental.json.JsonValue> converter)Convert the feature values into aJsonValueusing providedconverterfor the values stored in the feature (i.e.protected elemental.json.JsonValuegetAsDebugJson(Object value)Helper for getting a JSON representation of a child value.abstract elemental.json.JsonValuegetDebugJson()Gets a JSON object representing the contents of this feature.intgetId()Gets the id of this feature.StateNodegetNode()Gets the node of this feature.
-
-
-
Constructor Detail
-
NodeFeature
public NodeFeature(int id, StateNode node)Creates a new feature.- Parameters:
id- the id of the featurenode- the node that the feature belongs to
-
-
Method Detail
-
getId
public int getId()
Gets the id of this feature.- Returns:
- the id
-
getNode
public StateNode getNode()
Gets the node of this feature.- Returns:
- the node
-
getDebugJson
public abstract elemental.json.JsonValue getDebugJson()
Gets a JSON object representing the contents of this feature. Only intended for debugging purposes.- Returns:
- a JSON representation
-
convert
public abstract elemental.json.JsonValue convert(Function<Object,elemental.json.JsonValue> converter)
Convert the feature values into aJsonValueusing providedconverterfor the values stored in the feature (i.e. primitive types, StateNodes).- Parameters:
converter- converter to convert values stored in the feature- Returns:
- resulting converted value
-
getAsDebugJson
protected elemental.json.JsonValue getAsDebugJson(Object value)
Helper for getting a JSON representation of a child value.- Parameters:
value- the child value- Returns:
- the JSON representation
-
-