|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.umber.catalan.process.properties.BaseWorkProperties
Base class helper for IWorkProperties implementations.
Constructor Summary | |
BaseWorkProperties()
|
Method Summary | |
java.util.Map |
asMap()
Adapts this property set into a Map instance. |
static java.util.Map |
asMap(IWorkProperties props)
Adapts a property set into a Map instance. |
boolean |
getPropertyAsBoolean(java.lang.String name,
boolean defaultValue)
Retrieves the named property as a boolean; if the property exists but cannot be converted into a boolean, returns the default. |
Datum |
getPropertyAsDatum(java.lang.String name,
Datum defaultValue)
Retrieves the named property as a Datum; if the property cannot be converted into a Datum, returns the default. |
java.util.Map |
getPropertyAsMap(java.lang.String name,
java.util.Map defaultValue)
Retrieves the named property as a Map; if the property cannot be converted into a Map, returns the default. |
java.lang.Number |
getPropertyAsNumber(java.lang.String name,
java.lang.Number defaultValue)
Retrieves the named property as an Number; if the property exists but cannot be converted into an Number, returns the default. |
java.lang.String |
getPropertyAsString(java.lang.String name,
java.lang.String defaultValue)
Retrieves the named property as a String; if the property is not already a String, calls toString() on it before returning it. |
java.lang.String |
toString()
Converts object to String form. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.umber.catalan.process.properties.IWorkProperties |
getProperty, getPropertyNames |
Constructor Detail |
public BaseWorkProperties()
Method Detail |
public java.lang.String getPropertyAsString(java.lang.String name, java.lang.String defaultValue)
toString()
on it before returning it.
getPropertyAsString
in interface IWorkProperties
name
- the name of the propertydefaultValue
- value to return if property not found
public java.lang.Number getPropertyAsNumber(java.lang.String name, java.lang.Number defaultValue)
This implementation always converts String values into Double objects for better flexibility.
getPropertyAsNumber
in interface IWorkProperties
name
- the name of the propertydefaultValue
- value to return if property not found
public boolean getPropertyAsBoolean(java.lang.String name, boolean defaultValue)
true
, or to "false"
or "no" for false
.
getPropertyAsBoolean
in interface IWorkProperties
name
- the name of the propertydefaultValue
- value to return if property not found
public java.util.Map getPropertyAsMap(java.lang.String name, java.util.Map defaultValue)
getPropertyAsMap
in interface IWorkProperties
name
- the name of the propertydefaultValue
- value to return if property not found
public Datum getPropertyAsDatum(java.lang.String name, Datum defaultValue)
getPropertyAsDatum
in interface IWorkProperties
name
- the name of the propertydefaultValue
- value to return if property not found
public java.util.Map asMap()
public static java.util.Map asMap(IWorkProperties props)
props
- property set
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |