public class DefaultConfiguration extends java.lang.Object implements Configuration
Constructor and Description |
---|
DefaultConfiguration(java.util.Properties backingProperties) |
Modifier and Type | Method and Description |
---|---|
Runtime |
getRuntime()
Returns the target runtime for optimizations.
|
java.lang.String |
mandatoryValue(java.lang.String key)
Returns the value of the configuration for the requested
key or fails if not available.
|
<T> T |
optionalValue(java.lang.String key,
java.util.function.Function<java.util.Optional<java.lang.String>,T> producer)
Returns the value for the requested key.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
booleanValue, isFeatureEnabled, optionalString, stringList, stringList
public DefaultConfiguration(java.util.Properties backingProperties)
@NonNull public java.lang.String mandatoryValue(java.lang.String key)
Configuration
mandatoryValue
in interface Configuration
key
- the key to look forpublic <T> T optionalValue(java.lang.String key, java.util.function.Function<java.util.Optional<java.lang.String>,T> producer)
Configuration
optionalValue
in interface Configuration
T
- the type of the return valuekey
- the configuration keyproducer
- a function called to generate a transformed value@NonNull public Runtime getRuntime()
Configuration
getRuntime
in interface Configuration