|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Configuration
Configuration interface.
| Method Summary | |
|---|---|
void |
addProperty(String key,
Object value)
Add a property to the configuration. |
void |
clearProperty(String key)
Clear a property in the configuration. |
boolean |
containsKey(String key)
Check if the configuration contains the 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. |
Boolean |
getBoolean(String key,
Boolean defaultValue)
Get a boolean associated with the given configuration key. |
byte |
getByte(String key)
Get a byte associated with the given configuration key. |
byte |
getByte(String key,
byte defaultValue)
Get a byte associated with the given configuration key. |
Byte |
getByte(String key,
Byte defaultValue)
Get a byte 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. |
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. |
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. |
Integer |
getInteger(String key,
Integer defaultValue)
Get a int associated with the given configuration key. |
Iterator |
getKeys()
Get the list of the keys contained in the configuration repository. |
Iterator |
getKeys(String prefix)
Get the list of the keys contained in the configuration repository that match the specified prefix. |
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. |
Long |
getLong(String key,
Long defaultValue)
Get a long associated with the given configuration key. |
Properties |
getProperties(String key)
Get a list of properties associated with the given configuration key. |
String |
getProperty(String key)
Gets a property from the configuration. |
short |
getShort(String key)
Get a short associated with the given configuration key. |
short |
getShort(String key,
short defaultValue)
Get a short associated with the given configuration key. |
Short |
getShort(String key,
Short defaultValue)
Get a short 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. |
Vector |
getVector(String key)
Get a Vector of strings associated with the given configuration key. |
Vector |
getVector(String key,
Vector defaultValue)
Get a Vector of strings associated with the given configuration key. |
boolean |
isEmpty()
Check if the configuration is empty. |
void |
setProperty(String key,
Object value)
Set a property, this will replace any previously set values. |
Configuration |
subset(String prefix)
Create an Configuration object that is a subset of this one. |
| Method Detail |
|---|
Configuration subset(String prefix)
prefix - The prefix used to select the properties.boolean isEmpty()
boolean containsKey(String key)
void addProperty(String key,
Object value)
key - The Key to add the property to.value - The Value to add.
void setProperty(String key,
Object value)
key - The key of the property to changevalue - The new valuevoid clearProperty(String key)
key - the key to remove along with corresponding value.String getProperty(String key)
key - property to retrieve
Iterator getKeys(String prefix)
prefix - The prefix to test against.
Iterator getKeys()
Properties getProperties(String key)
key - The configuration key.
ClassCastException - is thrown if the key maps to an
object that is not a String/Vector.
IllegalArgumentException - if one of the tokens is
malformed (does not contain an equals sign).boolean getBoolean(String key)
key - The configuration key.
NoSuchElementException - is thrown if the key doesn't
map to an existing object.
ClassCastException - is thrown if the key maps to an
object that is not a Boolean.
boolean getBoolean(String key,
boolean defaultValue)
key - The configuration key.defaultValue - The default value.
ClassCastException - is thrown if the key maps to an
object that is not a Boolean.
Boolean getBoolean(String key,
Boolean defaultValue)
key - The configuration key.defaultValue - The default value.
ClassCastException - is thrown if the key maps to an
object that is not a Boolean.byte getByte(String key)
key - The configuration key.
NoSuchElementException - is thrown if the key doesn't
map to an existing object.
ClassCastException - is thrown if the key maps to an
object that is not a Byte.
NumberFormatException - is thrown if the value mapped
by the key has not a valid number format.
byte getByte(String key,
byte defaultValue)
key - The configuration key.defaultValue - The default value.
ClassCastException - is thrown if the key maps to an
object that is not a Byte.
NumberFormatException - is thrown if the value mapped
by the key has not a valid number format.
Byte getByte(String key,
Byte defaultValue)
key - The configuration key.defaultValue - The default value.
ClassCastException - is thrown if the key maps to an object that
is not a Byte.
NumberFormatException - is thrown if the value mapped by the key
has not a valid number format.double getDouble(String key)
key - The configuration key.
NoSuchElementException - is thrown if the key doesn't
map to an existing object.
ClassCastException - is thrown if the key maps to an
object that is not a Double.
NumberFormatException - is thrown if the value mapped
by the key has not a valid number format.
double getDouble(String key,
double defaultValue)
key - The configuration key.defaultValue - The default value.
ClassCastException - is thrown if the key maps to an
object that is not a Double.
NumberFormatException - is thrown if the value mapped
by the key has not a valid number format.
Double getDouble(String key,
Double defaultValue)
key - The configuration key.defaultValue - The default value.
ClassCastException - is thrown if the key maps to an
object that is not a Double.
NumberFormatException - is thrown if the value mapped
by the key has not a valid number format.float getFloat(String key)
key - The configuration key.
NoSuchElementException - is thrown if the key doesn't
map to an existing object.
ClassCastException - is thrown if the key maps to an
object that is not a Float.
NumberFormatException - is thrown if the value mapped
by the key has not a valid number format.
float getFloat(String key,
float defaultValue)
key - The configuration key.defaultValue - The default value.
ClassCastException - is thrown if the key maps to an
object that is not a Float.
NumberFormatException - is thrown if the value mapped
by the key has not a valid number format.
Float getFloat(String key,
Float defaultValue)
key - The configuration key.defaultValue - The default value.
ClassCastException - is thrown if the key maps to an
object that is not a Float.
NumberFormatException - is thrown if the value mapped
by the key has not a valid number format.int getInt(String key)
key - The configuration key.
NoSuchElementException - is thrown if the key doesn't
map to an existing object.
ClassCastException - is thrown if the key maps to an
object that is not a Integer.
NumberFormatException - is thrown if the value mapped
by the key has not a valid number format.
int getInt(String key,
int defaultValue)
key - The configuration key.defaultValue - The default value.
ClassCastException - is thrown if the key maps to an
object that is not a Integer.
NumberFormatException - is thrown if the value mapped
by the key has not a valid number format.
Integer getInteger(String key,
Integer defaultValue)
key - The configuration key.defaultValue - The default value.
ClassCastException - is thrown if the key maps to an object that
is not a Integer.
NumberFormatException - is thrown if the value mapped by the key
has not a valid number format.long getLong(String key)
key - The configuration key.
NoSuchElementException - is thrown if the key doesn't
map to an existing object.
ClassCastException - is thrown if the key maps to an
object that is not a Long.
NumberFormatException - is thrown if the value mapped
by the key has not a valid number format.
long getLong(String key,
long defaultValue)
key - The configuration key.defaultValue - The default value.
ClassCastException - is thrown if the key maps to an
object that is not a Long.
NumberFormatException - is thrown if the value mapped
by the key has not a valid number format.
Long getLong(String key,
Long defaultValue)
key - The configuration key.defaultValue - The default value.
ClassCastException - is thrown if the key maps to an
object that is not a Long.
NumberFormatException - is thrown if the value mapped
by the key has not a valid number format.short getShort(String key)
key - The configuration key.
NoSuchElementException - is thrown if the key doesn't
map to an existing object.
ClassCastException - is thrown if the key maps to an
object that is not a Short.
NumberFormatException - is thrown if the value mapped
by the key has not a valid number format.
short getShort(String key,
short defaultValue)
key - The configuration key.defaultValue - The default value.
ClassCastException - is thrown if the key maps to an
object that is not a Short.
NumberFormatException - is thrown if the value mapped
by the key has not a valid number format.
Short getShort(String key,
Short defaultValue)
key - The configuration key.defaultValue - The default value.
ClassCastException - is thrown if the key maps to an
object that is not a Short.
NumberFormatException - is thrown if the value mapped
by the key has not a valid number format.String getString(String key)
key - The configuration key.
ClassCastException - is thrown if the key maps to an object that
is not a String.
String getString(String key,
String defaultValue)
key - The configuration key.defaultValue - The default value.
ClassCastException - is thrown if the key maps to an object that
is not a String.String[] getStringArray(String key)
key - The configuration key.
ClassCastException - is thrown if the key maps to an
object that is not a String/Vector of Strings.Vector getVector(String key)
key - The configuration key.
ClassCastException - is thrown if the key maps to an
object that is not a Vector.
Vector getVector(String key,
Vector defaultValue)
key - The configuration key.defaultValue - The default value.
ClassCastException - is thrown if the key maps to an
object that is not a Vector.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||