Top Description Fields Constructors Methods
org.snakeyaml.engine.v2.nodes

public Class MappingNode

extends CollectionNode<NodeTuple>
Class Inheritance
Imports
java.util.List, .Objects, .Optional, org.snakeyaml.engine.v2.common.FlowStyle, org.snakeyaml.engine.v2.exceptions.Mark

Represents a map.

A map is a collection of unsorted key-value pairs.

Field Summary

Modifier and TypeField and Description
private boolean
private List<NodeTuple>

Constructor Summary

AccessConstructor and Description
public
MappingNode(Tag
- tag of the node
tag
,
boolean
- true when the tag is implicitly resolved
resolved
,
List<NodeTuple>
- the value
value
,
FlowStyle
- the flow style of the node
flowStyle
,
Optional<Mark>
- start
startMark
,
Optional<Mark>
- end
endMark
)

Create

public
MappingNode(Tag
- tag of the node
tag
,
List<NodeTuple>
- the value
value
,
FlowStyle
- the flow style of the node
flowStyle
)

Create

Method Summary

Modifier and TypeMethod and Description
public NodeType
public List<NodeTuple>

Returns:

List of entries.
getValue
()

Implements abstract org.snakeyaml.engine.v2.nodes.CollectionNode.getValue.

Returns the entries of this map.

public boolean

Returns:

true if map contains merge node
hasMergeTag
()

public void
setHasMergeTag(boolean
- true if map contains merge node
mergeTag
)

public void
setValue(List<NodeTuple>
- merged data to replace the internal value
merged
)

Applications may need to replace the content (Spring Boot).

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from org.snakeyaml.engine.v2.nodes.CollectionNode:
getFlowStylesetEndMarksetFlowStyle

Field Detail

mergeTagback to summary
private boolean mergeTag
valueback to summary
private List<NodeTuple> value

Constructor Detail

MappingNodeback to summary
public MappingNode(Tag tag, boolean resolved, List<NodeTuple> value, FlowStyle flowStyle, Optional<Mark> startMark, Optional<Mark> endMark)

Create

Parameters
tag:Tag

- tag of the node

resolved:boolean

- true when the tag is implicitly resolved

value:List<NodeTuple>

- the value

flowStyle:FlowStyle

- the flow style of the node

startMark:Optional<Mark>

- start

endMark:Optional<Mark>

- end

MappingNodeback to summary
public MappingNode(Tag tag, List<NodeTuple> value, FlowStyle flowStyle)

Create

Parameters
tag:Tag

- tag of the node

value:List<NodeTuple>

- the value

flowStyle:FlowStyle

- the flow style of the node

Method Detail

getNodeTypeback to summary
public NodeType getNodeType()

Implements abstract org.snakeyaml.engine.v2.nodes.Node.getNodeType.

Annotations
@Override
getValueback to summary
public List<NodeTuple> getValue()

Implements abstract org.snakeyaml.engine.v2.nodes.CollectionNode.getValue.

Returns the entries of this map.

Returns:List<NodeTuple>

List of entries.

hasMergeTagback to summary
public boolean hasMergeTag()
Returns:boolean

true if map contains merge node

setHasMergeTagback to summary
public void setHasMergeTag(boolean mergeTag)
Parameters
mergeTag:boolean

- true if map contains merge node

setValueback to summary
public void setValue(List<NodeTuple> merged)

Applications may need to replace the content (Spring Boot). Merging was removed, but it may be implemented.

Parameters
merged:List<NodeTuple>

- merged data to replace the internal value

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override