|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Configuration
A generic configuration object whose behavior is same as that of map but can store only literal values. The getters of this class return the value only if the config contains a mapping for that name with the correct type. An IllegalArgumentException is thrown otherwise.
Method Summary | |
---|---|
boolean |
getBoolean(String name)
Get a config for the name parameter. |
int |
getInt(String name)
Get a config for the name parameter. |
Set<String> |
getKeys()
Gets the configuration field names present in this config instance |
long |
getLong(String name)
Get a config for the name parameter. |
Serializable |
getObjectOrNull(String name)
Gets the value for the configuration field name name |
String |
getString(String name)
Get a config for the name parameter. |
boolean |
hasField(String name)
Returns true if the config contains a mapping for specified name |
Method Detail |
---|
boolean hasField(String name)
int getInt(String name) throws IllegalArgumentException
name
parameter.
name
is mapped to an int value
IllegalArgumentException
- if no mapping exists with name
or it exists but value is not of type intlong getLong(String name) throws IllegalArgumentException
name
parameter.
name
is mapped to a long value
IllegalArgumentException
- if no mapping exists with name
or it exists but value is not of type longboolean getBoolean(String name) throws IllegalArgumentException
name
parameter.
name
is mapped to a boolean value
IllegalArgumentException
- if no mapping exists with name
or it exists but value is not of type
booleanString getString(String name) throws IllegalArgumentException
name
parameter.
name
is mapped to a string value
IllegalArgumentException
- if no mapping exists with name
or it exists but value is not of type
stringSet<String> getKeys()
Serializable getObjectOrNull(String name)
name
name
if present, otherwise null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |