|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectjava.util.Dictionary
java.util.Hashtable
com.ibm.able.AbleProperties
This class is an extension of Hashtable that limits the keys and values to strings. Use setProperty() to add a property instead of put(). Convenience methods are included to provide default values and to convert to int, long, and double.
| Constructor Summary | |
|---|---|
AbleProperties()
Default constructor. |
|
AbleProperties(java.util.Map map)
Constructor an AbleProperties object from an existing map. |
|
| Method Summary | |
|---|---|
java.lang.String |
getProperty(java.lang.String theName)
Get a property value. |
double |
getProperty(java.lang.String theName,
double theDefault)
Return a property's value as a double. |
int |
getProperty(java.lang.String theName,
int theDefault)
Return a property's value as an int. |
long |
getProperty(java.lang.String theName,
long theDefault)
Return a property's value as a long. |
java.lang.String |
getProperty(java.lang.String theName,
java.lang.String theDefault)
Return a property's value as a String. |
java.lang.String |
removeProperty(java.lang.String theName)
Remove a property from the map. |
void |
setProperty(java.lang.String theName,
double theValue)
Set a property value. |
void |
setProperty(java.lang.String theName,
int theValue)
Set a property value. |
void |
setProperty(java.lang.String theName,
long theValue)
Set a property value. |
void |
setProperty(java.lang.String theName,
java.lang.String theValue)
Set a property value. |
| 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 AbleProperties()
public AbleProperties(java.util.Map map)
map - A Map with String key and String object values.| Method Detail |
public void setProperty(java.lang.String theName,
java.lang.String theValue)
theName - The property name.theValue - The property value.public java.lang.String getProperty(java.lang.String theName)
theName - The property name.
public java.lang.String getProperty(java.lang.String theName,
java.lang.String theDefault)
theName - The property name.theDefault - The property value to return if the property is undefined.
public void setProperty(java.lang.String theName,
int theValue)
theName - The property name.theValue - The property value.
public int getProperty(java.lang.String theName,
int theDefault)
theName - The property name.theDefault - The property value to return if the property is undefined.
public void setProperty(java.lang.String theName,
double theValue)
theName - The property name.theValue - The property value.
public double getProperty(java.lang.String theName,
double theDefault)
theName - The property name.theDefault - The property value to return if the property is undefined.
public void setProperty(java.lang.String theName,
long theValue)
theName - The property name.theValue - The property value.
public long getProperty(java.lang.String theName,
long theDefault)
theName - The property name.theDefault - The property value to return if the property is undefined.
public java.lang.String removeProperty(java.lang.String theName)
theName - The property name.
|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||