Interface YamlMappingBuilder


  • public interface YamlMappingBuilder
    Builder of YamlMapping. Implementations should be immutable and thread-safe.
    Since:
    1.0.0
    Version:
    $Id: 874262715a92df86ed142c9e7f098a2c4e102f99 $
    Author:
    Mihai Andronache (amihaiemil@gmail.com)
    • Method Detail

      • add

        YamlMappingBuilder add​(YamlNode key,
                               String value)
        Add a pair to the mapping.
        Parameters:
        key - YamlNode (sequence or mapping)
        value - String
        Returns:
        This builder
      • add

        YamlMappingBuilder add​(YamlNode key,
                               YamlNode value)
        Add a pair to the mapping.
        Parameters:
        key - YamlNode (sequence or mapping)
        value - YamlNode (sequence or mapping)
        Returns:
        This builder
      • add

        YamlMappingBuilder add​(String key,
                               YamlNode value)
        Add a pair to the mapping.
        Parameters:
        key - String
        value - YamlNode (sequence or mapping)
        Returns:
        This builder
      • build

        default YamlMapping build()
        Build the YamlMapping.
        Returns:
        Built YamlMapping.
      • build

        YamlMapping build​(String comment)
        Build the YamlMapping.
        Parameters:
        comment - Comment on top of the YamlMapping.
        Returns:
        Built YamlMapping.