Class Configuration
- All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>, SequencedMap<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).
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConfiguration(@NonNull String path, @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 configuration.Add a nested value for the given path.Add nested values for the given path.voidAdd a blank line.voidbooleancontainsKey(Object key) boolean@NonNull String@NonNull StringgetFullPath(String extension) @NonNull StringgetPath()@NonNull StringinthashCode()static StringsourceSetPath(@NonNull String sourceSet) configuration path for source set.Methods inherited from class LinkedHashMap
clear, containsValue, entrySet, forEach, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, removeEldestEntry, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, valuesMethods inherited from class HashMap
clone, compute, computeIfAbsent, computeIfPresent, isEmpty, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class AbstractMap
toStringMethods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from interface SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry
-
Field Details
-
COMMENT_PREFIX
- See Also:
-
BLANK_LINE_PREFIX
- See Also:
-
PREFIXES
-
-
Constructor Details
-
Configuration
-
-
Method Details
-
sourceSetPath
-
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
- Returns:
- path
-
getFileName
- Returns:
- filename
-
getFullPath
-
getTemplateKey
- Returns:
- template key
-
equals
-
hashCode
-
addCommaSeparatedValue
-
addListItem
-
comment
- Parameters:
comment- a comment to a configuration file.
-
blankLine
public void blankLine()Add a blank line.
-