| |
|
| java.lang.Object org.cougaar.lib.param.ParamTable
All known Subclasses: org.cougaar.lib.util.UTILParamTable,
ParamTable | public class ParamTable implements ParamMap(Code) | |
Class that encapsulates a parameter table. The table consists of
[name, org.cougaar.lib.param.ParamTable] pairs. If a parameter does not exist,
a ParamException will be thrown. this is not a RuntimeException,
so clients must use the try{}catch{} trick. The catch block is a
good place to put "default" values for the parameters.
|
ParamTable | public ParamTable(Logger logger)(Code) | |
Constructor. In the act of building a the parameter handler
we pass that class a pointer to ourselves so that it can
call our addParam() method.
Need to provide an entity resolver to the parser.
The entity resolver is just a wrapper of the configFinder.
The resolver is expected to resolve a systemID, where:
systemID is of the form : file:/ferris/bueller/day
user.dir is : /ferris/bueller
and we want just the last part (day)
NOTE: on NT -->
systemID is of the form : file:/C:/ferris/bueller/day
user.dir is : C:/ferris/bueller
No slash in front of the path on the user.dir.
envParams MUST have a param "envFile". It specifies the parse file!
Parameters: logger - the Logger to use |
addIniParameters | protected void addIniParameters(Vector envParams)(Code) | | |
addParam | public void addParam(String n, Param p)(Code) | | Add a parameter into the parameter table.
Parameters: n - name of the paramter Parameters: p - the parameter to add |
getBooleanParam | public boolean getBooleanParam(String name) throws ParamException(Code) | | Get the value of a boolean parameter.
Parameters: name - of the parameter to get the boolean value of the parameter |
getDoubleParam | public double getDoubleParam(String name) throws ParamException(Code) | | Get the value of a double parameter.
Parameters: name - of the parameter to get the double value of the parameter |
getFloatParam | public float getFloatParam(String name) throws ParamException(Code) | | Get the value of a float parameter.
Parameters: name - of the parameter to get the float value of the parameter |
getIntParam | public int getIntParam(String name) throws ParamException(Code) | | Get the value of a int parameter.
Parameters: name - of the parameter to get the int value of the parameter |
getLongParam | public long getLongParam(String name) throws ParamException(Code) | | Get the value of a long parameter.
Parameters: name - of the parameter to get the long value of the parameter |
getShortParam | public short getShortParam(String name) throws ParamException(Code) | | Get the value of a short parameter.
Parameters: name - of the parameter to get the short value of the parameter |
getStringParam | public String getStringParam(String name) throws ParamException(Code) | | Get the value of a String parameter.
Parameters: name - of the parameter to get the String value of the parameter |
getWithSlashAppended | static String getWithSlashAppended(String envDir)(Code) | | append slash if needed.
|
hasParam | public boolean hasParam(String name)(Code) | | is the parameter in the table?
|
toString | public String toString()(Code) | | show the parameters in the map *
|
|
|
|