Class MappingNode


  • public class MappingNode
    extends CollectionNode<NodeTuple>
    Represents a map.

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

    • 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"
      • setValue

        public void setValue​(java.util.List<NodeTuple> mergedValue)
      • 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