public abstract class AbstractConfiguration extends Object implements Configuration
| Constructor and Description |
|---|
AbstractConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
Properties |
asProperties() |
protected <T> T |
convertValue(Object value,
Class<T> type) |
<T> T |
get(String key,
T defaultValue)
Returns the value associated with the given key.
|
<T> T |
getAs(String key)
/**
Finds a value associated with the given key.
|
<T> T |
getAs(String key,
T defaultValue)
Finds a value associated with the given key.
|
boolean |
getAsBoolean(String key)
Finds a value associated with the given key.
|
boolean |
getAsBoolean(String key,
boolean defaultValue)
Finds a value associated with the given key.
|
double |
getAsDouble(String key)
Finds a value associated with the given key.
|
double |
getAsDouble(String key,
double defaultValue)
Finds a value associated with the given key.
|
float |
getAsFloat(String key)
Finds a value associated with the given key.
|
float |
getAsFloat(String key,
float defaultValue)
Finds a value associated with the given key.
|
int |
getAsInt(String key)
Finds a value associated with the given key.
|
int |
getAsInt(String key,
int defaultValue)
Finds a value associated with the given key.
|
long |
getAsLong(String key)
Finds a value associated with the given key.
|
long |
getAsLong(String key,
long defaultValue)
Finds a value associated with the given key.
|
String |
getAsString(String key)
Finds a value associated with the given key.
|
String |
getAsString(String key,
String defaultValue)
Finds a value associated with the given key.
|
Object |
getAt(String key)
Returns the value associated with the given key.
|
<T> T |
getAt(String key,
T defaultValue)
Returns the value associated with the given key.
|
<T> T |
getConverted(String key,
Class<T> type)
Finds a value associated with the given key.
|
<T> T |
getConverted(String key,
Class<T> type,
T defaultValue)
Finds a value associated with the given key.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasFlatMap, asResourceBundle, containsKey, get@Nullable public <T> T get(@Nonnull String key, @Nullable T defaultValue)
Configurationget in interface ConfigurationT - the type of the valuekey - the key to searchdefaultValue - the value to be returned if the key was not found@Nullable public Object getAt(@Nonnull String key)
ConfigurationgetAt in interface Configurationkey - the key to search@Nullable public <T> T getAt(@Nonnull String key, @Nullable T defaultValue)
ConfigurationgetAt in interface ConfigurationT - the type of the valuekey - the key to searchdefaultValue - the value to be returned if the key was not foundpublic boolean getAsBoolean(@Nonnull String key)
ConfigurationgetAsBoolean in interface Configurationkey - the key to searchpublic boolean getAsBoolean(@Nonnull String key, boolean defaultValue)
ConfigurationgetAsBoolean in interface Configurationkey - the key to searchdefaultValue - the value to be returned if the key is not foundpublic int getAsInt(@Nonnull String key)
ConfigurationgetAsInt in interface Configurationkey - the key to searchpublic int getAsInt(@Nonnull String key, int defaultValue)
ConfigurationgetAsInt in interface Configurationkey - the key to searchdefaultValue - the value to be returned if the key is not foundpublic long getAsLong(@Nonnull String key)
ConfigurationgetAsLong in interface Configurationkey - the key to searchpublic long getAsLong(@Nonnull String key, long defaultValue)
ConfigurationgetAsLong in interface Configurationkey - the key to searchdefaultValue - the value to be returned if the key is not foundpublic float getAsFloat(@Nonnull String key)
ConfigurationgetAsFloat in interface Configurationkey - the key to searchpublic float getAsFloat(@Nonnull String key, float defaultValue)
ConfigurationgetAsFloat in interface Configurationkey - the key to searchdefaultValue - the value to be returned if the key is not foundpublic double getAsDouble(@Nonnull String key)
ConfigurationgetAsDouble in interface Configurationkey - the key to searchpublic double getAsDouble(@Nonnull String key, double defaultValue)
ConfigurationgetAsDouble in interface Configurationkey - the key to searchdefaultValue - the value to be returned if the key is not found@Nullable public String getAsString(@Nonnull String key)
ConfigurationgetAsString in interface Configurationkey - the key to search@Nullable public <T> T getAs(@Nonnull String key)
ConfigurationgetAs in interface Configurationkey - the key to search@Nullable public <T> T getAs(@Nonnull String key, @Nullable T defaultValue)
ConfigurationgetAs in interface Configurationkey - the key to searchdefaultValue - the value to be returned if the key is not found@Nullable public <T> T getConverted(@Nonnull String key, @Nonnull Class<T> type)
ConfigurationPropertyEditor.getConverted in interface Configurationkey - the key to searchtype - the type to be returned@Nullable public <T> T getConverted(@Nonnull String key, @Nonnull Class<T> type, @Nullable T defaultValue)
ConfigurationPropertyEditor.
If not found then the supplied defaultValue will be returned.getConverted in interface Configurationkey - the key to searchtype - the type to be returneddefaultValue - the value to be returned if the key is not found@Nullable public String getAsString(@Nonnull String key, @Nullable String defaultValue)
ConfigurationgetAsString in interface Configurationkey - the key to searchdefaultValue - the value to be returned if the key is not found@Nonnull public Properties asProperties()
asProperties in interface Configuration