|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ezmorph.object.AbstractObjectMorpher net.sf.ezmorph.object.MapToDateMorpher
public class MapToDateMorpher
Morphs a Map into a Date.
The Map should have at least one of the following keys
[yer,month,day,hour,minutes,seconds,milliseconds] and the values should be
instances of Number. Any key that is not defined will have zero (0) assigned
as its value.
Constructor Summary | |
---|---|
MapToDateMorpher()
|
|
MapToDateMorpher(Date defaultValue)
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
Date |
getDefaultValue()
Returns the default value for this Morpher. |
int |
hashCode()
|
Object |
morph(Object value)
Morphs the input object into an output object of the supported type. |
Class |
morphsTo()
Returns the target Class for conversion. |
void |
setDefaultValue(Date defaultValue)
Sets the defaultValue to use if the value to be morphed is null. |
boolean |
supports(Class clazz)
Returns true if the Morpher supports conversion from this Class. Supports any type that is not an Array. |
Methods inherited from class net.sf.ezmorph.object.AbstractObjectMorpher |
---|
isUseDefault, setUseDefault |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MapToDateMorpher()
public MapToDateMorpher(Date defaultValue)
Method Detail |
---|
public boolean equals(Object obj)
equals
in class Object
public Date getDefaultValue()
public int hashCode()
hashCode
in class Object
public Object morph(Object value)
ObjectMorpher
value
- The input value to be morphedpublic Class morphsTo()
Morpher
public void setDefaultValue(Date defaultValue)
defaultValue
- return value if the value to be morphed is nullpublic boolean supports(Class clazz)
AbstractObjectMorpher
supports
in interface Morpher
supports
in class AbstractObjectMorpher
clazz
- the source Class
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |