public interface ContainerConfiguration
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(String key)
Check if the configuration contains the specified key.
|
boolean |
getBoolean(String key)
Get a boolean associated with the given configuration key.
|
boolean |
getBoolean(String key,
boolean defaultValue)
Get a boolean associated with the given configuration key.
|
double |
getDouble(String key)
Get a double associated with the given configuration key.
|
double |
getDouble(String key,
double defaultValue)
Get a double associated with the given configuration key.
|
float |
getFloat(String key)
Get a float associated with the given configuration key.
|
float |
getFloat(String key,
float defaultValue)
Get a float associated with the given configuration key.
|
int |
getInt(String key)
Get a int associated with the given configuration key.
|
int |
getInt(String key,
int defaultValue)
Get a int associated with the given configuration key.
|
Iterator<String> |
getKeys()
Get the list of the keys contained in the configuration.
|
List<String> |
getList(String key)
Get a List of strings associated with the given configuration key.
|
long |
getLong(String key)
Get a long associated with the given configuration key.
|
long |
getLong(String key,
long defaultValue)
Get a long associated with the given configuration key.
|
String |
getString(String key)
Get a string associated with the given configuration key.
|
String |
getString(String key,
String defaultValue)
Get a string associated with the given configuration key.
|
String[] |
getStringArray(String key)
Get an array of strings associated with the given configuration key.
|
boolean |
isDevelopmentMode()
Checks if the container is running under development mode
|
boolean |
isEmpty()
Check if the configuration is empty.
|
Properties |
toProperties()
Convert a ContainerConfiguration class into a Properties class.
|
boolean isEmpty()
true
if the configuration contains no property,
false
otherwise.boolean containsKey(String key)
key
- the key whose presence in this configuration is to be testedboolean getBoolean(String key)
key
- key
and false
if key is missingRuntimeException
- if key is present but mapped to wrong typeboolean getBoolean(String key, boolean defaultValue)
key
- defaultValue
- key
and if key
maps to object that does not
map to a boolean/Boolean or is missing, defaultValue
is returnedString getString(String key)
key
- key
and null
if key is missingRuntimeException
- if key is present but mapped to wrong typeString getString(String key, String defaultValue)
key
- defaultValue
- key
and if key
maps to object that does not
map to a string or is missing, defaultValue
is returneddouble getDouble(String key)
key
- key
and 0D
if key is missingRuntimeException
- if key is present but mapped to wrong typedouble getDouble(String key, double defaultValue)
key
- defaultValue
- key
and if key
maps to object that does not
map to a double/Double or is missing, defaultValue
is returnedfloat getFloat(String key)
key
- key
and 0F
if key is missingRuntimeException
- if key is present but mapped to wrong typefloat getFloat(String key, float defaultValue)
key
- defaultValue
- key
and if key
maps to object that does not
map to a float/Float or is missing, defaultValue
is returnedint getInt(String key)
key
- key
and 0
if key is missingRuntimeException
- if key is present but mapped to wrong typeint getInt(String key, int defaultValue)
key
- defaultValue
- key
and if key
maps to object that does not
map to a int/Int or is missing, defaultValue
is returnedList<String> getList(String key)
long getLong(String key)
key
- key
and 0L
if key is missingRuntimeException
- if key is present but mapped to wrong typelong getLong(String key, long defaultValue)
key
- defaultValue
- key
and if key
maps to object that does not
map to a long/Long or is missing, defaultValue
is returnedString[] getStringArray(String key)
key
- boolean isDevelopmentMode()
Properties toProperties()
Copyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.