Package net.obvj.confectory.merger
Interface ConfigurationMerger<T>
-
- Type Parameters:
T- the source and targetConfigurationtype
- All Known Implementing Classes:
AbstractConfigurationMerger,GenericJsonConfigurationMerger,JSONObjectConfigurationMerger,PropertiesConfigurationMerger
public interface ConfigurationMerger<T>Base abstraction for merging twoConfigurationobjects of the same type<T>.- Since:
- 2.1.0
- Author:
- oswaldo.bapvic.jr (Oswaldo Junior)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Configuration<T>merge(Configuration<T> config1, Configuration<T> config2, net.obvj.jsonmerge.JsonMergeOption... mergeOptions)Combines twoConfigurationobjects into a newConfiguration.
-
-
-
Method Detail
-
merge
Configuration<T> merge(Configuration<T> config1, Configuration<T> config2, net.obvj.jsonmerge.JsonMergeOption... mergeOptions)
Combines twoConfigurationobjects into a newConfiguration.The resulting object will receive all the elements of both input objects. In case of conflicting keys, the values at the highest-precedence
Configurationwill be selected.The metadata of the highest-precedence
Configuration(namespace and precedence) will be applied to the newConfiguration.- Parameters:
config1- the firstConfiguration; not nullconfig2- the secondConfiguration; not nullmergeOptions- an array of options on how to merge JSON objects (optional)- Returns:
- a new
Configurationresulting from the combination ofconfig1andconfig2
-
-