fr.emn.reactiveinput
Class GenericProperties
java.lang.Object
java.util.Dictionary
java.util.Hashtable
java.util.Properties
fr.emn.reactiveinput.GenericProperties
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Map, java.io.Serializable
- public class GenericProperties
- extends java.util.Properties
This is a subclass of Properties which allows additional property types:
integer, double, boolean, arrays, etc. Those properties are stored in a string form.
Use ScriptUtilities.toValue and ScriptUtilies.toScriptValue to set/retreive
arrays and other types.
- See Also:
- Serialized Form
Fields inherited from class java.util.Properties |
defaults |
Method Summary |
boolean |
getProperty(java.lang.String key,
boolean defaultValue)
Returns true if the property =yes or =true, or is simply present (has no argument). |
double |
getProperty(java.lang.String key,
double defaultValue)
|
int |
getProperty(java.lang.String key,
int defaultValue)
|
java.lang.String[] |
getProperty(java.lang.String key,
java.lang.String[] defaultValue)
Returns true if the property =yes or =true, or is simply present (has no argument). |
java.lang.String |
getScript()
TESTED
Special characters (space,...) are not yet supported for strings. |
void |
setProperty(java.lang.String key,
boolean value)
|
void |
setProperty(java.lang.String key,
double value)
|
void |
setProperty(java.lang.String key,
int value)
|
void |
setProperty(java.lang.String key,
java.lang.String[] value)
|
Methods inherited from class java.util.Properties |
getProperty, getProperty, list, list, load, propertyNames, save, setProperty, store |
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 |
GenericProperties
public GenericProperties()
GenericProperties
public GenericProperties(java.lang.String script)
- TESTED
getProperty
public java.lang.String[] getProperty(java.lang.String key,
java.lang.String[] defaultValue)
- Returns true if the property =yes or =true, or is simply present (has no argument).
getProperty
public double getProperty(java.lang.String key,
double defaultValue)
getProperty
public int getProperty(java.lang.String key,
int defaultValue)
getProperty
public boolean getProperty(java.lang.String key,
boolean defaultValue)
- Returns true if the property =yes or =true, or is simply present (has no argument).
getScript
public java.lang.String getScript()
- TESTED
Special characters (space,...) are not yet supported for strings.
setProperty
public void setProperty(java.lang.String key,
java.lang.String[] value)
setProperty
public void setProperty(java.lang.String key,
double value)
setProperty
public void setProperty(java.lang.String key,
int value)
setProperty
public void setProperty(java.lang.String key,
boolean value)