Top Description Fields Constructors Methods
org.yaml.snakeyaml.nodes

public Class MappingNode

extends CollectionNode<NodeTuple>
Class Inheritance
Imports
java.util.List, org.yaml.snakeyaml.DumperOptions, org.yaml.snakeyaml.error.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, boolean resolved, List<NodeTuple> value, Mark startMark, Mark endMark, DumperOptions.FlowStyle flowStyle)

public

Method Summary

Modifier and TypeMethod and Description
public NodeId
getNodeId()

Implements abstract org.yaml.snakeyaml.nodes.Node.getNodeId.

For error reporting.
public List<NodeTuple>

Returns:

List of entries.
getValue
()

Implements abstract org.yaml.snakeyaml.nodes.CollectionNode.getValue.

Returns the entries of this map.
public boolean

Returns:

true if map contains merge node
isMerged
()

public void
setMerged(boolean
- true if map contains merge node
merged
)

public void
setOnlyKeyType(Class<? extends Object> keyType)

public void
setTypes(Class<? extends Object> keyType, Class<? extends Object> valueType)

public void
setValue(List<NodeTuple> mergedValue)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.yaml.snakeyaml.nodes.CollectionNode:
getFlowStylesetEndMarksetFlowStyle

Field Detail

mergedback to summary
private boolean merged
valueback to summary
private List<NodeTuple> value

Constructor Detail

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

Method Detail

getNodeIdback to summary
public NodeId getNodeId()

Implements abstract org.yaml.snakeyaml.nodes.Node.getNodeId.

Doc from org.yaml.snakeyaml.nodes.Node.getNodeId.

For error reporting.

Returns:NodeId

scalar, sequence, mapping

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

Implements abstract org.yaml.snakeyaml.nodes.CollectionNode.getValue.

Returns the entries of this map.

Returns:List<NodeTuple>

List of entries.

isMergedback to summary
public boolean isMerged()
Returns:boolean

true if map contains merge node

setMergedback to summary
public void setMerged(boolean merged)
Parameters
merged:boolean

- true if map contains merge node

setOnlyKeyTypeback to summary
public void setOnlyKeyType(Class<? extends Object> keyType)
setTypesback to summary
public void setTypes(Class<? extends Object> keyType, Class<? extends Object> valueType)
setValueback to summary
public void setValue(List<NodeTuple> mergedValue)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override