|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectunsw.cse.mica.util.ListProperties
public class ListProperties
A concrete implementation of the MicaProperties interface
MicaProperties| Constructor Summary | |
|---|---|
ListProperties()
|
|
ListProperties(ListProperties properties)
|
|
| Method Summary | |
|---|---|
void |
add(java.lang.String param)
Adds a parameter with no value. |
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 |
readFromStringArray(java.lang.String[] arr)
Converts an array created by the "writeToStringArray" back into the normal param-value format, including any necessary decoding of encoded charactes in the param part of the string. |
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. |
java.lang.String |
toString()
|
java.lang.String[] |
writeToStringArray()
Helper function to convert the param-value pairs into uniquely reversible strings that are then placed into a 1-D String array. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ListProperties()
public ListProperties(ListProperties properties)
| Method Detail |
|---|
public void add(java.lang.String param)
param - the name of the parameter
public void add(java.lang.String param,
java.lang.String value)
MicaProperties
add in interface MicaProperties
public void replace(java.lang.String param,
java.lang.String value)
MicaProperties
replace in interface MicaPropertiespublic void remove(java.lang.String param)
MicaProperties
remove in interface MicaPropertiesparam - the name of the parameter to be removedpublic boolean hasParam(java.lang.String param)
MicaProperties
hasParam in interface MicaPropertiesparam - the name of the parameter to look for.
public java.lang.String getValue(java.lang.String param)
MicaProperties
getValue in interface MicaPropertiesparam - The parameter whose value is to be obtained
public java.lang.String getValue(java.lang.String param,
java.lang.String defaultValue)
MicaProperties
getValue in interface MicaPropertiesparam - The parameter whose value is to be obtained
public boolean getBooleanValue(java.lang.String param,
boolean defaultValue)
MicaProperties
getBooleanValue in interface MicaPropertiesparam - The parameter whose value is to be obtained
public int getIntegerValue(java.lang.String param,
int defaultValue)
MicaProperties
getIntegerValue in interface MicaPropertiesparam - The parameter whose value is to be obtained
public float getFloatValue(java.lang.String param,
float defaultValue)
MicaProperties
getFloatValue in interface MicaPropertiesparam - The parameter whose value is to be obtained
public double getDoubleValue(java.lang.String param,
double defaultValue)
MicaProperties
getDoubleValue in interface MicaPropertiesparam - The parameter whose value is to be obtained
public int getSize()
MicaProperties
getSize in interface MicaPropertiespublic java.lang.String getParam(int pos)
MicaProperties
getParam in interface MicaPropertiespos - the index of the param name to be obtained
public java.lang.String getValue(int pos)
MicaProperties
getValue in interface MicaPropertiespos - the index of the value to be obtained
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String[] writeToStringArray()
public void readFromStringArray(java.lang.String[] arr)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||