|
|||||||||
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.w3c.util.ObservableProperties
public class ObservableProperties
An enhanced property class that provides support to monitor changes. This class extends the basic properties class of Java, by providing monitoring support. It also provides more type conversion.
PropertyMonitoring
,
Serialized FormField Summary |
---|
Fields inherited from class java.util.Properties |
---|
defaults |
Constructor Summary | |
---|---|
ObservableProperties(java.util.Properties props)
Build an httpdProperties instance from a Properties instance. |
Method Summary | |
---|---|
boolean |
getBoolean(java.lang.String name,
boolean def)
Get this property value, as a boolean. |
double |
getDouble(java.lang.String name,
double def)
Get this property value, as a double. |
java.io.File |
getFile(java.lang.String name,
java.io.File def)
Get this property value, as a File. |
int |
getInteger(java.lang.String name,
int def)
Get this property value, as an integer. |
long |
getLong(java.lang.String name,
long def)
|
java.lang.String |
getString(java.lang.String name,
java.lang.String def)
Get this property value, as a String. |
java.lang.String[] |
getStringArray(java.lang.String name,
java.lang.String[] def)
Get this property as a String array. |
boolean |
putValue(java.lang.String name,
java.lang.String value)
Update a property value. |
void |
registerObserver(PropertyMonitoring o)
Subscribe for property monitoring. |
boolean |
unregisterObserver(PropertyMonitoring o)
Unsubscribe this object from the observers list. |
Methods inherited from class java.util.Properties |
---|
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, storeToXML, storeToXML |
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 ObservableProperties(java.util.Properties props)
props
- The Properties instance.Method Detail |
---|
public void registerObserver(PropertyMonitoring o)
observer
- The object that handles the PropertyMonitoring
interface.public boolean unregisterObserver(PropertyMonitoring o)
observer
- The observer to unsubscribe.
public boolean putValue(java.lang.String name, java.lang.String value)
name
- The name of the property to assign.value
- The new value for this property, or null
if the property setting is to be cancelled.
public boolean getBoolean(java.lang.String name, boolean def)
name
- The name of the property to be fetched.def
- The default value, if the property isn't defined.
public java.lang.String getString(java.lang.String name, java.lang.String def)
name
- The name of the property to be fetched.def
- The default value, if the property isn't defined.
public java.lang.String[] getStringArray(java.lang.String name, java.lang.String[] def)
name
- The property's name.def
- The default value (if undefined).
public int getInteger(java.lang.String name, int def)
name
- The name of the property to be fetched.def
- The default value, if the property isn't defined.
public long getLong(java.lang.String name, long def)
public double getDouble(java.lang.String name, double def)
name
- The name of the property.def
- The default value if undefined.
public java.io.File getFile(java.lang.String name, java.io.File def)
name
- The name of the property to be fetched.def
- The default value, if the property isn't defined.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |