org.yaml.snakeyaml.nodes

## Class MappingNode

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

    public class MappingNode
    extends CollectionNode

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, java.util.List<NodeTuple> value, Mark startMark, Mark endMark, java.lang.Boolean flowStyle)`
`MappingNode(Tag tag, java.util.List<NodeTuple> value, java.lang.Boolean flowStyle)`

### Method Summary

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

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

`getFlowStyle, setEndMark, setFlowStyle`

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

`equals, getEndMark, getStartMark, getTag, getType, hashCode, isResolved, isTwoStepsConstruction, 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,
               java.util.List<NodeTuple> value,
               Mark startMark,
               Mark endMark,
               java.lang.Boolean flowStyle)

#### MappingNode

    public MappingNode(Tag tag,
               java.util.List<NodeTuple> value,
               java.lang.Boolean flowStyle)

### 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 java.util.List<NodeTuple> getValue()

Returns the entries of this map.

Returns:
  List of entries.

#### setValue

    public void setValue(java.util.List<NodeTuple> merge)

#### setOnlyKeyType

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

#### setTypes

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

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.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