Package org.snakeyaml.engine.v2.nodes
Class MappingNode
- java.lang.Object
-
- org.snakeyaml.engine.v2.nodes.Node
-
- org.snakeyaml.engine.v2.nodes.CollectionNode<NodeTuple>
-
- org.snakeyaml.engine.v2.nodes.MappingNode
-
public class MappingNode extends CollectionNode<NodeTuple>
Represents a map.A map is a collection of unsorted key-value pairs.
-
-
Constructor Summary
Constructors Constructor Description MappingNode(Tag tag, boolean resolved, java.util.List<NodeTuple> value, FlowStyle flowStyle, java.util.Optional<Mark> startMark, java.util.Optional<Mark> endMark)
CreateMappingNode(Tag tag, java.util.List<NodeTuple> value, FlowStyle flowStyle)
Create
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeType
getNodeType()
java.util.List<NodeTuple>
getValue()
Returns the entries of this map.void
setValue(java.util.List<NodeTuple> merged)
Applications may need to replace the content (Spring Boot).java.lang.String
toString()
-
Methods inherited from class org.snakeyaml.engine.v2.nodes.CollectionNode
getFlowStyle, setEndMark, setFlowStyle
-
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
-
-
-
-
Field Detail
-
value
private java.util.List<NodeTuple> value
-
-
Constructor Detail
-
MappingNode
public MappingNode(Tag tag, boolean resolved, java.util.List<NodeTuple> value, FlowStyle flowStyle, java.util.Optional<Mark> startMark, java.util.Optional<Mark> endMark)
Create- Parameters:
tag
- - tag of the noderesolved
- - true when the tag is implicitly resolvedvalue
- - the valueflowStyle
- - the flow style of the nodestartMark
- - startendMark
- - end
-
-
Method Detail
-
getNodeType
public NodeType getNodeType()
- Specified by:
getNodeType
in classNode
- Returns:
- scalar, sequence, mapping
-
getValue
public java.util.List<NodeTuple> getValue()
Returns the entries of this map.- Specified by:
getValue
in classCollectionNode<NodeTuple>
- Returns:
- List of entries.
-
setValue
public void setValue(java.util.List<NodeTuple> merged)
Applications may need to replace the content (Spring Boot). Merging was removed, but it may be implemented.- Parameters:
merged
- - merged data to replace the internal value
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-