public class ConfigurationBridge extends java.lang.Object implements Configuration
Settings
to Configuration
Constructor and Description |
---|
ConfigurationBridge(Settings settings) |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.lang.String> |
get(java.lang.String key)
The effective value of the specified property.
|
java.lang.String[] |
getStringArray(java.lang.String key)
Used to read multi-valued properties.
|
boolean |
hasKey(java.lang.String key) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBoolean, getDouble, getFloat, getInt, getLong
public ConfigurationBridge(Settings settings)
public java.util.Optional<java.lang.String> get(java.lang.String key)
Configuration
Optional#empty()
if the property is not set and has no defined default value.
If the property is encrypted with a secret key, then the returned value is decrypted.
get
in interface Configuration
public boolean hasKey(java.lang.String key)
hasKey
in interface Configuration
true
if the property has a non-default value, else false
.public java.lang.String[] getStringArray(java.lang.String key)
Configuration
See PropertyDefinition.Builder.multiValues(boolean)
Multi-valued properties coming from scanner are parsed as CSV lines (ie comma separator and optional double quotes to escape values).
Non quoted values are trimmed and empty fields are ignored.
Examples :
getStringArray
in interface Configuration