|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable<java.lang.Object,java.lang.Object>
java.util.Properties
org.mbari.siam.core.SiamProperties
public class SiamProperties
SiamProperties extends java.util.Properties, with more robust parsing of keys and values.
| Field Summary |
|---|
| Fields inherited from class java.util.Properties |
|---|
defaults |
| Constructor Summary | |
|---|---|
SiamProperties()
|
|
| Method Summary | |
|---|---|
ChannelRange[] |
getChannelRangeProperty(java.lang.String key)
Searches for the integer range property with specified key. |
int[] |
getIntegerArrayProperty(java.lang.String key)
Searches for the property with specified key, where the value contains an array of integers. |
int |
getIntegerProperty(java.lang.String key)
Searches for the integer property with specified key. |
int |
getIntegerProperty(java.lang.String key,
int defaultValue)
Searches for the integer property with specified key. |
long |
getLongProperty(java.lang.String key)
Searches for the long integer property with specified key. |
long |
getLongProperty(java.lang.String key,
long defaultValue)
Searches for the long integer property with specified key. |
int |
getNonNegativeIntegerProperty(java.lang.String key)
|
java.lang.String |
getProperty(java.lang.String key)
Searches for the property with specified key. |
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
Searches for the property with specified key. |
java.lang.String |
getRequiredProperty(java.lang.String key)
Get value of specified property; throw MissingPropertyException if not found. |
java.lang.String[] |
getStringArrayProperty(java.lang.String key,
java.lang.String[] validValues,
java.lang.String delimiter)
Searches for the property with specified key, where the value contains an array of Strings. |
ChannelRange[] |
parseChannelRangeProperty(java.lang.String rangeStr)
|
protected int |
parseInteger(java.lang.String s)
Performs an Integer.parseInt(), but allows hexadecimal beginning with "0x" |
java.lang.String[] |
parseStringArrayProperty(java.lang.String inStr,
java.lang.String[] validValues,
java.lang.String delimiter)
|
| Methods inherited from class java.util.Properties |
|---|
list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames |
| Methods inherited from class java.util.Hashtable |
|---|
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SiamProperties()
| Method Detail |
|---|
public java.lang.String getProperty(java.lang.String key)
getProperty in class java.util.Properties
public java.lang.String getProperty(java.lang.String key,
java.lang.String defaultValue)
getProperty in class java.util.Properties
public java.lang.String getRequiredProperty(java.lang.String key)
throws MissingPropertyException
MissingPropertyException
protected int parseInteger(java.lang.String s)
throws java.lang.NumberFormatException
java.lang.NumberFormatException
public int getIntegerProperty(java.lang.String key)
throws MissingPropertyException,
InvalidPropertyException
MissingPropertyException
InvalidPropertyException
public int getIntegerProperty(java.lang.String key,
int defaultValue)
public ChannelRange[] getChannelRangeProperty(java.lang.String key)
throws MissingPropertyException,
InvalidPropertyException
MissingPropertyException
InvalidPropertyException
public ChannelRange[] parseChannelRangeProperty(java.lang.String rangeStr)
throws MissingPropertyException,
InvalidPropertyException
MissingPropertyException
InvalidPropertyException
public int getNonNegativeIntegerProperty(java.lang.String key)
throws MissingPropertyException,
InvalidPropertyException
MissingPropertyException
InvalidPropertyException
public long getLongProperty(java.lang.String key)
throws MissingPropertyException,
InvalidPropertyException
MissingPropertyException
InvalidPropertyException
public long getLongProperty(java.lang.String key,
long defaultValue)
public int[] getIntegerArrayProperty(java.lang.String key)
throws MissingPropertyException,
InvalidPropertyException
For example: analogPort12 = 0 0 4 100 10 #returns 5 integers
MissingPropertyException
InvalidPropertyException
public java.lang.String[] getStringArrayProperty(java.lang.String key,
java.lang.String[] validValues,
java.lang.String delimiter)
throws MissingPropertyException,
InvalidPropertyException
For example: platformAnalogTypes = foo bar baz # returns 3 Strings
MissingPropertyException
InvalidPropertyException
public java.lang.String[] parseStringArrayProperty(java.lang.String inStr,
java.lang.String[] validValues,
java.lang.String delimiter)
throws MissingPropertyException,
InvalidPropertyException
MissingPropertyException
InvalidPropertyException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||