|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object O2Plib.misc.ParamHash
public class ParamHash
Field Summary | |
---|---|
java.util.Hashtable |
curHT
Current hash table of values read |
static java.lang.String |
errMsg
error code string if an error occurred, else null |
int |
nEntries
# of hash table entries after call readNameValuesHashTableFromFile() |
int |
nStateEntries
# of hash table entries |
Constructor Summary | |
---|---|
ParamHash()
ParamHash() - Constructor |
Method Summary | |
---|---|
boolean |
getStateValue(java.lang.String key,
boolean def)
getStateValue() - get boolean PARAM and use default if not found. |
float |
getStateValue(java.lang.String key,
float def)
getStateValue() - get float PARAM and use default if not found. |
int |
getStateValue(java.lang.String key,
int def)
getStateValue() - get int PARAM and use default if not found. |
long |
getStateValue(java.lang.String key,
long def)
getStateValue() - get float PARAM and use default if not found. |
short |
getStateValue(java.lang.String key,
short def)
getStateValue() - get short PARAM and use default if not found. |
java.lang.String |
getStateValue(java.lang.String key,
java.lang.String def)
getStateValue() - get PARAM and use default if not found or the value is "null" string. |
java.util.Hashtable |
readNameValuesHashTableFromFile(java.lang.String fileName,
java.lang.String sMsg,
int hashTableSize)
readNameValuesHashTableFromFile() - read a hashtable of tab-delimited name-value pairs from a file. |
java.util.Hashtable |
readNameValuesHashTableFromFile(java.lang.String fileName,
java.lang.String sMsg,
int hashTableSize,
boolean usePopupAlertsFlag)
readNameValuesHashTableFromFile() - read a hashtable of tab-delimited name-value pairs from a file. |
static java.util.Hashtable |
readPropFileToHashtable(java.lang.String propFile)
readPropFileToHashtable() - read the property file to a hash table |
void |
setStateHashtableForGetValue(java.util.Hashtable ht)
setStateHashtableForGetValue() - set working hash table for next getStateValue calls |
void |
setStateHashtableForGetValue(java.util.Hashtable ht,
int nEntriesVal)
setStateHashtableForGetValue() - set working hash table for next getStateValue calls |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.util.Hashtable curHT
public int nStateEntries
public int nEntries
public static java.lang.String errMsg
Constructor Detail |
---|
public ParamHash()
Method Detail |
---|
public static java.util.Hashtable readPropFileToHashtable(java.lang.String propFile)
stateFile
- is the name of the ProtPlot state file
public java.util.Hashtable readNameValuesHashTableFromFile(java.lang.String fileName, java.lang.String sMsg, int hashTableSize)
fileName
- is the name of the file to readsMsg
- to print when reading the file.
public java.util.Hashtable readNameValuesHashTableFromFile(java.lang.String fileName, java.lang.String sMsg, int hashTableSize, boolean usePopupAlertsFlag)
fileName
- is the name of the file to readsMsg
- to print when reading the file.usePopupAlertsFlag
- if allow popup error messages
public void setStateHashtableForGetValue(java.util.Hashtable ht, int nEntriesVal)
ht
- is hashtable to usenEntriesVal
- is the number of elements used in the hash table.public void setStateHashtableForGetValue(java.util.Hashtable ht)
ht
- is hashtable to usepublic java.lang.String getStateValue(java.lang.String key, java.lang.String def)
key
- def
- is the default value if not found or has value "null"
public int getStateValue(java.lang.String key, int def)
public short getStateValue(java.lang.String key, short def)
public long getStateValue(java.lang.String key, long def)
public float getStateValue(java.lang.String key, float def)
public boolean getStateValue(java.lang.String key, boolean def)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |