Package be.dezijwegel.betteryaml.util
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
-
Constructor Details
-
YamlMerger
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
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
-