org.yaml.snakeyaml.nodes

## Class MappingNode

- java.lang.Object
- - org.yaml.snakeyaml.nodes.Node
  - - org.yaml.snakeyaml.nodes.CollectionNode<NodeTuple>
    - - org.yaml.snakeyaml.nodes.MappingNode

    public class MappingNode
    extends CollectionNode<NodeTuple>

Represents a map.

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

### Field Summary

### Fields inherited from class org.yaml.snakeyaml.nodes.Node

`endMark, resolved, useClassConstructor`

### Constructor Summary

Constructors
Constructor and Description
`MappingNode(Tag tag, boolean resolved, List<NodeTuple> value, Mark startMark, Mark endMark, Boolean flowStyle)` Deprecated.
`MappingNode(Tag tag, boolean resolved, List<NodeTuple> value, Mark startMark, Mark endMark, DumperOptions.FlowStyle flowStyle)`
`MappingNode(Tag tag, List<NodeTuple> value, Boolean flowStyle)` Deprecated.
`MappingNode(Tag tag, List<NodeTuple> value, DumperOptions.FlowStyle flowStyle)`

### Method Summary

Methods
`NodeId` `getNodeId()` For error reporting.
`List<NodeTuple>` `getValue()` Returns the entries of this map.
`boolean` `isMerged()`
`void` `setMerged(boolean merged)`
`void` `setOnlyKeyType(Class<? extends Object> keyType)`
`void` `setTypes(Class<? extends Object> keyType, Class<? extends Object> valueType)`
`void` `setValue(List<NodeTuple> mergedValue)`
`String` `toString()`

### Methods inherited from class org.yaml.snakeyaml.nodes.CollectionNode

`getFlowStyle, setEndMark, setFlowStyle, setFlowStyle`

### Methods inherited from class org.yaml.snakeyaml.nodes.Node

`equals, getAnchor, getBlockComments, getEndComments, getEndMark, getInLineComments, getStartMark, getTag, getType, hashCode, isResolved, isTwoStepsConstruction, setAnchor, setBlockComments, setEndComments, setInLineComments, setTag, setTwoStepsConstruction, setType, setUseClassConstructor, useClassConstructor`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### MappingNode

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

#### MappingNode

    public MappingNode(Tag tag,
               List<NodeTuple> value,
               DumperOptions.FlowStyle flowStyle)

#### MappingNode

    @Deprecated
    public MappingNode(Tag tag,
                          boolean resolved,
                          List<NodeTuple> value,
                          Mark startMark,
                          Mark endMark,
                          Boolean flowStyle)

Deprecated.

#### MappingNode

    @Deprecated
    public MappingNode(Tag tag,
                          List<NodeTuple> value,
                          Boolean flowStyle)

Deprecated.

### Method Detail

#### getNodeId

    public NodeId getNodeId()

Description copied from class: `Node`
For error reporting.

Specified by:
  `getNodeId` in class `Node`
Returns:
  scalar, sequence, mapping
See Also:
  "class variable 'id' in PyYAML"

#### getValue

    public List<NodeTuple> getValue()

Returns the entries of this map.

Specified by:
  `getValue` in class `CollectionNode<NodeTuple>`
Returns:
  List of entries.

#### setValue

    public void setValue(List<NodeTuple> mergedValue)

#### setOnlyKeyType

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

#### setTypes

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

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### setMerged

    public void setMerged(boolean merged)

Parameters:
  `merged` - - true if map contains merge node

#### isMerged

    public boolean isMerged()

Returns:
  true if map contains merge node