net.sf.ezmorph.object

Class MapToDateMorpher

public class MapToDateMorpher extends AbstractObjectMorpher

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.

Author: Andres Almiray

Constructor Summary
MapToDateMorpher()
MapToDateMorpher(Date defaultValue)
Method Summary
booleanequals(Object obj)
DategetDefaultValue()
Returns the default value for this Morpher.
inthashCode()
Objectmorph(Object value)
ClassmorphsTo()
voidsetDefaultValue(Date defaultValue)
Sets the defaultValue to use if the value to be morphed is null.
booleansupports(Class clazz)

Constructor Detail

MapToDateMorpher

public MapToDateMorpher()

MapToDateMorpher

public MapToDateMorpher(Date defaultValue)

Method Detail

equals

public boolean equals(Object obj)

getDefaultValue

public Date getDefaultValue()
Returns the default value for this Morpher.

hashCode

public int hashCode()

morph

public Object morph(Object value)

morphsTo

public Class morphsTo()

setDefaultValue

public void setDefaultValue(Date defaultValue)
Sets the defaultValue to use if the value to be morphed is null.

Parameters: defaultValue return value if the value to be morphed is null

supports

public boolean supports(Class clazz)
Copyright © 2006-2011. All Rights Reserved.