public class DelegatingMutableConfiguration extends ConfigurationDecorator implements MutableConfiguration
delegate
Constructor and Description |
---|
DelegatingMutableConfiguration(Configuration delegate) |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
asFlatMap() |
java.util.ResourceBundle |
asResourceBundle() |
boolean |
containsKey(java.lang.String key)
Searches for the key in this configuration.
|
java.lang.Object |
get(java.lang.String key)
Returns the value associated with the given key.
|
<T> T |
get(java.lang.String key,
T defaultValue)
Returns the value associated with the given key.
|
java.lang.String |
getAsString(java.lang.String key,
java.lang.String defaultValue)
Finds a value associated with the given key.
|
java.lang.Object |
remove(java.lang.String key)
Removes a key from this configuration.
|
<T> T |
removeAs(java.lang.String key)
Removes a key from this configuration.
|
<T> T |
removeConverted(java.lang.String key,
java.lang.Class<T> type)
Removes a key from this configuration.
|
void |
set(java.lang.String key,
java.lang.Object value)
Sets a key/value pair on this configuration.
|
asProperties, convertValue, getAs, getAs, getAsBoolean, getAsBoolean, getAsDouble, getAsDouble, getAsFloat, getAsFloat, getAsInt, getAsInt, getAsLong, getAsLong, getAsString, getAt, getAt, getConverted, getConverted, getConverted, getConverted
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asProperties, getAs, getAs, getAsBoolean, getAsBoolean, getAsDouble, getAsDouble, getAsFloat, getAsFloat, getAsInt, getAsInt, getAsLong, getAsLong, getAsString, getAt, getAt, getConverted, getConverted, getConverted, getConverted
public DelegatingMutableConfiguration(@Nonnull Configuration delegate)
public void set(@Nonnull java.lang.String key, @Nonnull java.lang.Object value)
MutableConfiguration
set
in interface MutableConfiguration
key
- the key to be registeredvalue
- the value to save@Nullable public java.lang.Object remove(@Nonnull java.lang.String key)
MutableConfiguration
remove
in interface MutableConfiguration
key
- the key to be removed@Nullable public <T> T removeAs(@Nonnull java.lang.String key)
MutableConfiguration
removeAs
in interface MutableConfiguration
key
- the key to be removed@Nullable public <T> T removeConverted(@Nonnull java.lang.String key, @Nonnull java.lang.Class<T> type)
MutableConfiguration
PropertyEditor
.removeConverted
in interface MutableConfiguration
key
- the key to be removedtype
- the type to be returned@Nonnull public java.util.Map<java.lang.String,java.lang.Object> asFlatMap()
asFlatMap
in interface Configuration
asFlatMap
in class ConfigurationDecorator
@Nonnull public java.util.ResourceBundle asResourceBundle()
asResourceBundle
in interface Configuration
asResourceBundle
in class ConfigurationDecorator
@Nullable public java.lang.Object get(@Nonnull java.lang.String key)
Configuration
get
in interface Configuration
get
in class ConfigurationDecorator
key
- the key to search@Nullable public <T> T get(@Nonnull java.lang.String key, @Nullable T defaultValue)
Configuration
get
in interface Configuration
get
in class ConfigurationDecorator
T
- the type of the valuekey
- the key to searchdefaultValue
- the value to be returned if the key was not found@Nullable public java.lang.String getAsString(@Nonnull java.lang.String key, @Nullable java.lang.String defaultValue)
Configuration
getAsString
in interface Configuration
getAsString
in class ConfigurationDecorator
key
- the key to searchdefaultValue
- the value to be returned if the key is not foundpublic boolean containsKey(@Nonnull java.lang.String key)
Configuration
containsKey
in interface Configuration
containsKey
in class ConfigurationDecorator
key
- the key to search