|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.sape.carbon.core.config.type.handlers.DateTypeHandler
Parses and formats between Strings and Dates in the format of "MM/dd/yyyy". An example is "08/07/2002" or August 7th, 2002.
Copyright 2002 Sapient
| Field Summary | |
private static DateFormat |
dateFormat
A Date Formatter for the format of "MM/dd/YYYY" |
| Constructor Summary | |
DateTypeHandler()
|
|
| Method Summary | |
Object |
toObject(Class type,
String stringValue)
Parses a string into a Date object. |
String |
toString(Object objectValue)
Formats an Date into a String value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static DateFormat dateFormat
| Constructor Detail |
public DateTypeHandler()
| Method Detail |
public Object toObject(Class type,
String stringValue)
throws TypeConversionException
Parses a string into a Date object.
toObject in interface ConfigurationTypeHandlerstringValue - the String representation of the requested Datetype - String
TypeConversionException - when the string does not represent
a valid Datepublic String toString(Object objectValue)
Formats an Date into a String value.
toString in interface ConfigurationTypeHandlerobjectValue - the Date to be formatted
ClassCastException - when past an object other than a Date
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||