de.hedenus.util
Class Properties
java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable<java.lang.Object,java.lang.Object>
java.util.Properties
de.hedenus.util.Properties
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,java.lang.Object>
- Direct Known Subclasses:
- Preferences
public class Properties
- extends java.util.Properties
Extension of java.util.Properties
.
- Author:
- Michael Hedenus
- See Also:
- Serialized Form
Fields inherited from class java.util.Properties |
defaults |
Method Summary |
java.lang.String |
getProperty(java.lang.String key)
|
boolean |
getPropertyBoolean(java.lang.String key)
The value is considered true if it equals "true", "yes", "on" (all ignoring case) or "1". |
double |
getPropertyDouble(java.lang.String key)
|
float |
getPropertyFloat(java.lang.String key)
|
int |
getPropertyInt(java.lang.String key)
|
long |
getPropertyLong(java.lang.String key)
|
void |
load(java.net.URL url)
|
protected java.lang.String |
resolveProperty(java.lang.String key,
java.lang.String value)
Resolves a property value by expanding references to other keys
using the Ant syntax ${property} . |
Methods inherited from class java.util.Properties |
getProperty, 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 |
Properties
public Properties()
Properties
public Properties(java.util.Properties parentProperties)
load
public void load(java.net.URL url)
throws java.io.IOException
- Throws:
java.io.IOException
getPropertyBoolean
public boolean getPropertyBoolean(java.lang.String key)
- The value is considered true if it equals "true", "yes", "on" (all ignoring case) or "1".
getPropertyInt
public int getPropertyInt(java.lang.String key)
getPropertyLong
public long getPropertyLong(java.lang.String key)
getPropertyFloat
public float getPropertyFloat(java.lang.String key)
getPropertyDouble
public double getPropertyDouble(java.lang.String key)
getProperty
public java.lang.String getProperty(java.lang.String key)
- Overrides:
getProperty
in class java.util.Properties
resolveProperty
protected java.lang.String resolveProperty(java.lang.String key,
java.lang.String value)
- Resolves a property value by expanding references to other keys
using the Ant syntax
${property}
.
If a referenced property does not exist, an UndefinedPropertyException
is thrown.