public class YamlScalarImpl extends AbstractYamlNode implements MutableYamlScalar
UNNAMED_NODE| Constructor and Description |
|---|
YamlScalarImpl(YamlNode parent,
String nodeName,
Object value) |
| Modifier and Type | Method and Description |
|---|---|
<T> boolean |
isA(Class<T> type)
Checks if the value of this node is the given type
|
<T> T |
nodeValue()
Gets the value of the node
Please note that if the scalar's type is not the expected type T,
a
ClassCastException is thrown at the call site. |
<T> T |
nodeValue(Class<T> type)
Gets the value of the node with validating its type against the
provided type
|
void |
setValue(Object newValue)
Sets the value of the scalar node
|
String |
toString() |
nodeName, parent, path, setNodeNamepublic <T> boolean isA(Class<T> type)
YamlScalarisA in interface YamlScalarT - the type to checktype - the Class instance of the type to checkpublic <T> T nodeValue()
YamlScalarClassCastException is thrown at the call site.nodeValue in interface YamlScalarT - the expected type of the nodepublic <T> T nodeValue(Class<T> type)
YamlScalarnodeValue in interface YamlScalarT - the expected type of the nodepublic void setValue(Object newValue)
MutableYamlScalarsetValue in interface MutableYamlScalarnewValue - The new value of the scalar nodeCopyright © 2020 Hazelcast, Inc.. All Rights Reserved.