public class DataObjectImpl extends HashMap<String,String> implements DataObject
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
DataObjectImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
getBoolean(String name,
boolean defaultValue)
Retrieve the result as a boolean
|
Calendar |
getCalendar(String name)
Retrieve the date.
|
Date |
getDate(String name)
Retrieve the date.
|
int |
getInteger(String name)
Retrieve a value as an integer
|
void |
setBoolean(String name,
boolean value)
Set a value as a boolean
|
void |
setDate(String name,
Date date)
Set a date value.
|
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
public boolean getBoolean(String name, boolean defaultValue)
getBoolean
in interface DataObject
name
- the property namedefaultValue
- the default value if not foundpublic void setBoolean(String name, boolean value)
setBoolean
in interface DataObject
name
- the property namevalue
- the property valuepublic void setDate(String name, Date date)
setDate
in interface DataObject
name
- the property namedate
- the date in GMT timepublic Date getDate(String name)
getDate
in interface DataObject
name
- the property namepublic Calendar getCalendar(String name)
DataObject
getCalendar
in interface DataObject
name
- the property namepublic int getInteger(String name)
getInteger
in interface DataObject
name
- the property name