|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.eos.config.Configuration
public class Configuration
A simple name value configuration handler.
| Constructor Summary | |
|---|---|
Configuration()
Creates a new instance. |
|
Configuration(Configuration toCopy)
Copy constructor. |
|
| Method Summary | |
|---|---|
String |
get(String name)
Returns a value for the given name. |
String |
get(String name,
String defaultValue)
Returns a value for the given name. |
boolean |
getBoolean(String name,
boolean defaultValue)
Returns a value for the given name as boolean |
float |
getFloat(String name,
float defaultValue)
Returns a value for the given name as float |
int |
getInt(String name,
int defaultValue)
Returns a value for the given name as int |
Iterator<Map.Entry<String,String>> |
iterator()
Returns an iterator for the configuration entries. |
void |
set(String name,
String value)
Puts the configuration for the name and the value |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Configuration()
public Configuration(Configuration toCopy)
toCopy - the Configuration to copy.| Method Detail |
|---|
public void set(String name,
String value)
name - the name of the configuration valuevalue - the value of the configuration name.public String get(String name)
name - the name to look up for a value
null
public String get(String name,
String defaultValue)
name - the name to look up for a valuedefaultValue - a default value
nullpublic Iterator<Map.Entry<String,String>> iterator()
iterator in interface Iterable<Map.Entry<String,String>>public String toString()
toString in class Object
public boolean getBoolean(String name,
boolean defaultValue)
boolean
name - the name to look up for a valuedefaultValue - a default value
ConfigurationKey.Type.BOOLEAN
public int getInt(String name,
int defaultValue)
int
name - the name to look up for a valuedefaultValue - a default value
ConfigurationKey.Type.INTEGER
public float getFloat(String name,
float defaultValue)
float
name - the name to look up for a valuedefaultValue - a default value
ConfigurationKey.Type.FLOAT
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||