|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MicaProperties
An interface for the settings passed to an Agent at init time (and possibly for other things too). It provides functionality for a list of param-value pairs where duplicate non-null parameter names and null values allowed. It differs from the standard Java Properties in that it maintains its original ordering. This is useful as it allows Agents to accept order-specific initialization information. We use an interface so that any future changes will (hopefully) have less impact on existing code.
Method Summary | |
---|---|
void |
add(java.lang.String param,
java.lang.String value)
Add a param-value pair to the end of the properties. |
boolean |
getBooleanValue(java.lang.String param,
boolean defaultValue)
Get the boolean value for a given property name. |
double |
getDoubleValue(java.lang.String param,
double defaultValue)
Get the double value for a given property name. |
float |
getFloatValue(java.lang.String param,
float defaultValue)
Get the float value for a given property name. |
int |
getIntegerValue(java.lang.String param,
int defaultValue)
Get the integer value for a given property name. |
java.lang.String |
getParam(int pos)
Get the param name of the param-value pair at the given index. |
int |
getSize()
Get the number of param-value pairs |
java.lang.String |
getValue(int pos)
Get the value of the param-value pair at the given index. |
java.lang.String |
getValue(java.lang.String param)
Get the value for a given property name. |
java.lang.String |
getValue(java.lang.String param,
java.lang.String defaultValue)
Get the value for a given property name. |
boolean |
hasParam(java.lang.String param)
check if there is a param with the given name |
void |
remove(java.lang.String param)
Remove the first occurence of the given param. |
void |
replace(java.lang.String param,
java.lang.String value)
Replace the first occurrence of param with value. |
Method Detail |
---|
boolean hasParam(java.lang.String param)
param
- the name of the parameter to look for.
void add(java.lang.String param, java.lang.String value)
param
- value
- void replace(java.lang.String param, java.lang.String value)
param
- value
- void remove(java.lang.String param)
param
- the name of the parameter to be removedjava.lang.String getValue(java.lang.String param)
param
- The parameter whose value is to be obtained
java.lang.String getValue(java.lang.String param, java.lang.String defaultValue)
param
- The parameter whose value is to be obtained
boolean getBooleanValue(java.lang.String param, boolean defaultValue)
param
- The parameter whose value is to be obtained
int getIntegerValue(java.lang.String param, int defaultValue)
param
- The parameter whose value is to be obtained
float getFloatValue(java.lang.String param, float defaultValue)
param
- The parameter whose value is to be obtained
double getDoubleValue(java.lang.String param, double defaultValue)
param
- The parameter whose value is to be obtained
int getSize()
java.lang.String getParam(int pos)
pos
- the index of the param name to be obtained
java.lang.String getValue(int pos)
pos
- the index of the value to be obtained
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |