public class Conf extends Object
Conf
objects are defined by a map storing pair of
keys and values in which the key is a String
corresponding to the
flag of the parameter and the value is an Object
corresponding to the
value associated to the related key.Constructor and Description |
---|
Conf() |
Modifier and Type | Method and Description |
---|---|
Conf |
addParam(String p,
Object v)
Add the parameter to the configuration
Override existing parameter if one exists.
|
boolean |
containsParam(String p)
Return true if the given parameter is stored in the current
configuration.
|
boolean |
containsParams()
Check if the configuration contains at least one parameter.
|
Object |
getParam(String p)
Return the value associated to the given parameter as an
Object . |
double |
getParamAsDouble(String p)
Return the value associated to the given parameter as a double value.
|
String |
getParamAsString(String p)
Return the value associated to the given parameter as a
String . |
Map<String,Object> |
getParams()
Getter of the Map storing the entry loaded in the configuration.
|
void |
removeParam(String p)
Remove the entry corresponding to the given key if one is stored.
|
void |
setParams(HashMap<String,Object> params)
Set the current map to the given.
|
String |
toString() |
public String getParamAsString(String p)
String
.p
- the flag of the parameter you want to retrieve the value.public Object getParam(String p)
Object
.p
- the flag of the parameter you want to retrieve the value.public double getParamAsDouble(String p) throws SLIB_Ex_Critic
p
- the flag of the parameterSLIB_Ex_Critic
public boolean containsParam(String p)
p
- the parameter flagpublic Conf addParam(String p, Object v)
p
- the parameter flagv
- the value associatedpublic void removeParam(String p)
p
- the key to process.public Map<String,Object> getParams()
public void setParams(HashMap<String,Object> params)
params
- the new map defining the configuration.public boolean containsParams()
Copyright © 2014. All rights reserved.