Package org.snakeyaml.engine.v2.nodes
Class ScalarNode
- java.lang.Object
-
- org.snakeyaml.engine.v2.nodes.Node
-
- org.snakeyaml.engine.v2.nodes.ScalarNode
-
public class ScalarNode extends Node
Represents a scalar node.Scalar nodes form the leaves in the node graph.
-
-
Constructor Summary
Constructors Constructor Description ScalarNode(Tag tag, boolean resolved, String value, ScalarStyle style, Optional<Mark> startMark, Optional<Mark> endMark)ScalarNode(Tag tag, String value, ScalarStyle style)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeTypegetNodeType()ScalarStylegetScalarStyle()Get scalar style of this node.StringgetValue()Value of this scalar.booleanisPlain()StringtoString()-
Methods inherited from class org.snakeyaml.engine.v2.nodes.Node
equals, getAnchor, getBlockComments, getEndComments, getEndMark, getInLineComments, getProperty, getStartMark, getTag, hashCode, isRecursive, setAnchor, setBlockComments, setEndComments, setInLineComments, setProperty, setRecursive, setTag
-
-
-
-
Constructor Detail
-
ScalarNode
public ScalarNode(Tag tag, boolean resolved, String value, ScalarStyle style, Optional<Mark> startMark, Optional<Mark> endMark)
-
ScalarNode
public ScalarNode(Tag tag, String value, ScalarStyle style)
-
-
Method Detail
-
getScalarStyle
public ScalarStyle getScalarStyle()
Get scalar style of this node.- Returns:
- style of this scalar node
- See Also:
Flow styles - https://yaml.org/spec/1.2/spec.html#id2786942 Block styles - https://yaml.org/spec/1.2/spec.html#id2793652
-
getNodeType
public NodeType getNodeType()
- Specified by:
getNodeTypein classNode- Returns:
- scalar, sequence, mapping
-
getValue
public String getValue()
Value of this scalar.- Returns:
- Scalar's value.
-
isPlain
public boolean isPlain()
-
-