Class Configuration
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,Object>
- Direct Known Subclasses:
ApplicationConfiguration,BootstrapConfiguration
Models application environment configuration to specify where the configuration is rooted
for the given configuration values (key/value pairs).
- Since:
- 2.3.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionConfiguration(@NonNull String sourceSet, @NonNull String fileName, @NonNull String templateKey) A configuration rooted at path, with the given map of configurations -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCommaSeparatedValue(String key, String value) voidaddListItem(String key, String value) addNested(NestedConfiguration nestedConfiguration) Adds nested configurationAdd a nested value for the given path.Add nested values for the given path.booleancontainsKey(Object key) boolean@NonNull String@NonNull StringgetFullPath(String extension) @NonNull StringgetPath()@NonNull StringinthashCode()Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class java.util.AbstractMap
toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Constructor Details
-
Configuration
public Configuration(@NonNull @NonNull String sourceSet, @NonNull @NonNull String fileName, @NonNull @NonNull String templateKey) A configuration rooted at path, with the given map of configurations- Parameters:
sourceSet- where the configuration is rooted, e.g. main, testfileName- FilenametemplateKey- Template Key
-
-
Method Details
-
containsKey
- Specified by:
containsKeyin interfaceMap<String,Object> - Overrides:
containsKeyin classHashMap<String,Object>
-
get
-
addNested
Add a nested value for the given path.- Parameters:
path- The pathvalue- The value- Returns:
- this configuration
-
addNested
Adds nested configuration- Parameters:
nestedConfiguration- Nested Configuration- Returns:
- this configuration
-
addNested
Add nested values for the given path.- Parameters:
values- A map of path to value entries- Returns:
- this configuration
-
getPath
-
getFileName
-
getFullPath
-
getTemplateKey
-
equals
-
hashCode
public int hashCode() -
addCommaSeparatedValue
-
addListItem
-