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
ConstructorDescriptionConfiguration
(@NonNull String sourceSet, @NonNull String fileName, @NonNull String templateKey) A configuration rooted at path, with the given map of configurations -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCommaSeparatedValue
(String key, String value) void
addListItem
(String key, String value) addNested
(NestedConfiguration nestedConfiguration) Adds nested configurationAdd a nested value for the given path.Add nested values for the given path.boolean
containsKey
(Object key) boolean
@NonNull String
@NonNull String
getFullPath
(String extension) @NonNull String
getPath()
@NonNull String
int
hashCode()
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, getOrDefault, keySet, removeEldestEntry, replaceAll, values
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
Methods inherited from class java.util.AbstractMap
toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:
containsKey
in interfaceMap<String,
Object> - Overrides:
containsKey
in 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
-