Class MappingNode


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

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

    • Field Detail

      • value

        private java.util.List<NodeTuple> value
    • Constructor Detail

      • MappingNode

        public MappingNode​(Tag tag,
                           boolean resolved,
                           java.util.List<NodeTuple> value,
                           FlowStyle flowStyle,
                           java.util.Optional<Mark> startMark,
                           java.util.Optional<Mark> endMark)
        Create
        Parameters:
        tag - - tag of the node
        resolved - - true when the tag is implicitly resolved
        value - - the value
        flowStyle - - the flow style of the node
        startMark - - start
        endMark - - end
      • MappingNode

        public MappingNode​(Tag tag,
                           java.util.List<NodeTuple> value,
                           FlowStyle flowStyle)
        Create
        Parameters:
        tag - - tag of the node
        value - - the value
        flowStyle - - the flow style of the node
    • Method Detail

      • getNodeType

        public NodeType getNodeType()
        Specified by:
        getNodeType in class Node
        Returns:
        scalar, sequence, mapping
      • setValue

        public void setValue​(java.util.List<NodeTuple> merged)
        Applications may need to replace the content (Spring Boot). Merging was removed, but it may be implemented.
        Parameters:
        merged - - merged data to replace the internal value
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object