net.sf.ezmorph.object
public final class DateMorpher extends AbstractObjectMorpher
This morpher will iterate through the supplied formats until one succeeds or the default value is returned (if default value is configured).
Constructor Summary | |
---|---|
DateMorpher(String[] formats) | |
DateMorpher(String[] formats, boolean lenient) | |
DateMorpher(String[] formats, Date defaultValue) | |
DateMorpher(String[] formats, Date defaultValue, Locale locale, boolean lenient) | |
DateMorpher(String[] formats, Locale locale) | |
DateMorpher(String[] formats, Locale locale, boolean lenient) |
Method Summary | |
---|---|
boolean | equals(Object obj) |
Date | getDefaultValue()
Returns the default value for this Morpher. |
int | hashCode() |
Object | morph(Object value) |
Class | morphsTo() |
void | setDefaultValue(Date defaultValue)
Sets the defaultValue to use if the value to be morphed is null.
|
boolean | supports(Class clazz) |
Parameters: formats a list of formats this morpher supports.
Parameters: formats a list of formats this morpher supports. lenient if the parsing should be lenient or not.
Parameters: formats a list of formats this morpher supports. defaultValue return value if the value to be morphed is null.
Parameters: formats a list of formats this morpher supports. defaultValue return value if the value to be morphed is null. locale the Locale used to parse each format. lenient if the parsing should be lenient or not.
Parameters: formats a list of formats this morpher supports. locale the Locale used to parse each format.
Parameters: formats a list of formats this morpher supports. locale the Locale used to parse each format. lenient if the parsing should be lenient or not.
Parameters: defaultValue return value if the value to be morphed is null