|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.qedeq.base.io.Parameters
public class Parameters
Provides convenience methods for getting parameters out of a Map
.
The keys and the values are stored as Strings.
Field Summary | |
---|---|
static Parameters |
EMPTY
Empty parameters. |
Constructor Summary | |
---|---|
Parameters()
Constructs parameter access object. |
|
Parameters(java.util.Map map)
Constructs parameter access object. |
Method Summary | |
---|---|
boolean |
getBoolean(java.lang.String key)
Searches for the value with the specified key. |
boolean |
getBoolean(java.lang.String key,
boolean def)
Searches for the value with the specified key. |
int |
getInt(java.lang.String key)
Searches for the value with the specified key. |
int |
getInt(java.lang.String key,
int def)
Searches for the value with the specified key. |
java.lang.String |
getParameterString()
Get all parameters as a long string. |
java.lang.String |
getString(java.lang.String key)
Searches for the value with the specified key. |
java.lang.String |
getString(java.lang.String key,
java.lang.String def)
Searches for the value with the specified key. |
java.util.Set |
keySet()
Return key set for internal map. |
void |
setDefault(java.lang.String key,
boolean value)
Set default configuration parameter if the key has still no value. |
void |
setDefault(java.lang.String key,
int value)
Set default configuration parameter if the key has still no value. |
void |
setDefault(java.lang.String key,
java.lang.String value)
Set default configuration parameter if the key has still no value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Parameters EMPTY
Constructor Detail |
---|
public Parameters(java.util.Map map)
map
- Herein are the parameters. Must not be null
.public Parameters()
Method Detail |
---|
public java.lang.String getString(java.lang.String key)
key
- The key we want a value for.
public java.lang.String getString(java.lang.String key, java.lang.String def)
def
is returned.
key
- The key we want a value for.def
- The default value we get if we have no String value.
public int getInt(java.lang.String key)
key
- The key we want a value for.
public int getInt(java.lang.String key, int def)
def
is returned.
key
- The key we want a value for.def
- The default value we get if we have no String value.
public boolean getBoolean(java.lang.String key)
false
is returned.
key
- The key we want a value for.
public boolean getBoolean(java.lang.String key, boolean def)
def
is returned.
key
- The key we want a value for.def
- The default value we get if we have no String value.
public java.lang.String getParameterString()
public void setDefault(java.lang.String key, int value)
key
- Key we want to check.value
- Default value.public void setDefault(java.lang.String key, java.lang.String value)
key
- Key we want to check.value
- Default value.public void setDefault(java.lang.String key, boolean value)
key
- Key we want to check.value
- Default value.public java.util.Set keySet()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |