Class BasicTypeValue
- java.lang.Object
-
- com.vaadin.flow.internal.nodefeature.NodeFeature
-
- com.vaadin.flow.internal.nodefeature.NodeValue<Serializable>
-
- com.vaadin.flow.internal.nodefeature.BasicTypeValue
-
- All Implemented Interfaces:
Serializable
public class BasicTypeValue extends NodeValue<Serializable>
The feature contains a value of the basic type.The value is wrapped into a
StateNodeand this feature instead being sent directly. It allows to use basic types in lists.For internal use only. May be renamed or removed in a future release.
- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BasicTypeValue(StateNode node)Creates a new value map for the given node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetKey()Gets the key that should be used when the value of this feature is sent to the client.SerializablegetValue()Gets the value of a basic type.voidsetValue(Serializable value)Sets the value of a basic type.-
Methods inherited from class com.vaadin.flow.internal.nodefeature.NodeValue
collectChanges, forEachChild, generateChangesFromEmpty
-
Methods inherited from class com.vaadin.flow.internal.nodefeature.NodeFeature
allowsChanges, attachPotentialChild, detatchPotentialChild, getNode, onAttach, onDetach
-
-
-
-
Constructor Detail
-
BasicTypeValue
public BasicTypeValue(StateNode node)
Creates a new value map for the given node.- Parameters:
node- the node that the map belongs to
-
-
Method Detail
-
getKey
protected String getKey()
Description copied from class:NodeValueGets the key that should be used when the value of this feature is sent to the client.The key is fetched on demand from the sub class instead of e.g. requiring it as a constructor parameter to avoid storing an additional member field in each instance.
- Specified by:
getKeyin classNodeValue<Serializable>- Returns:
- the key value, not
null
-
setValue
public void setValue(Serializable value)
Sets the value of a basic type.- Overrides:
setValuein classNodeValue<Serializable>- Parameters:
value- the value to set
-
getValue
public Serializable getValue()
Gets the value of a basic type.- Overrides:
getValuein classNodeValue<Serializable>- Returns:
- the value
-
-