public class DelegatingMutableConfiguration extends ConfigurationDecorator implements MutableConfiguration
delegate
Constructor and Description |
---|
DelegatingMutableConfiguration(Configuration delegate) |
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
asFlatMap() |
ResourceBundle |
asResourceBundle() |
boolean |
containsKey(String key)
Searches for the key in this configuration.
|
Object |
get(String key)
Returns the value associated with the given key.
|
<T> T |
get(String key,
T defaultValue)
Returns the value associated with the given key.
|
String |
getAsString(String key,
String defaultValue)
Finds a value associated with the given key.
|
Object |
remove(String key)
Removes a key from this configuration.
|
<T> T |
removeAs(String key)
Removes a key from this configuration.
|
<T> T |
removeConverted(String key,
Class<T> type)
Removes a key from this configuration.
|
void |
set(String key,
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
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
public DelegatingMutableConfiguration(@Nonnull Configuration delegate)
public void set(@Nonnull String key, @Nonnull Object value)
MutableConfiguration
set
in interface MutableConfiguration
key
- the key to be registeredvalue
- the value to save@Nullable public Object remove(@Nonnull String key)
MutableConfiguration
remove
in interface MutableConfiguration
key
- the key to be removed@Nullable public <T> T removeAs(@Nonnull String key)
MutableConfiguration
removeAs
in interface MutableConfiguration
key
- the key to be removed@Nullable public <T> T removeConverted(@Nonnull String key, @Nonnull Class<T> type)
MutableConfiguration
PropertyEditor
.removeConverted
in interface MutableConfiguration
key
- the key to be removedtype
- the type to be returned@Nonnull public Map<String,Object> asFlatMap()
asFlatMap
in interface Configuration
asFlatMap
in class ConfigurationDecorator
@Nonnull public ResourceBundle asResourceBundle()
asResourceBundle
in interface Configuration
asResourceBundle
in class ConfigurationDecorator
@Nullable public Object get(@Nonnull String key)
Configuration
get
in interface Configuration
get
in class ConfigurationDecorator
key
- the key to search@Nullable public <T> T get(@Nonnull 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 String getAsString(@Nonnull String key, @Nullable 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 String key)
Configuration
containsKey
in interface Configuration
containsKey
in class ConfigurationDecorator
key
- the key to search