Class YamlMerger

java.lang.Object
be.dezijwegel.betteryaml.util.YamlMerger

public class YamlMerger
extends Object
  • Constructor Summary

    Constructors
    Constructor Description
    YamlMerger​(Map<String,​Object> defaultOptions)
    Prepare default options to be merged with live options
  • Method Summary

    Modifier and Type Method Description
    Map<String,​Object> merge​(Map<String,​Object> options)
    Merge the given options with the stored defaults The provided options will get priority over default values Any missing values in the provided map will be filled in by the default values All keys in the provided map, that are not in the defaultOptions (provided through constructor), will be ignored

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • YamlMerger

      public YamlMerger​(Map<String,​Object> defaultOptions)
      Prepare default options to be merged with live options
      Parameters:
      defaultOptions - the default key-value pairs, to be used when no others are available
  • Method Details

    • merge

      public Map<String,​Object> merge​(Map<String,​Object> options)
      Merge the given options with the stored defaults The provided options will get priority over default values Any missing values in the provided map will be filled in by the default values All keys in the provided map, that are not in the defaultOptions (provided through constructor), will be ignored
      Parameters:
      options - the options to be merged with all default values
      Returns:
      the merged Map