org.apache.wicket.util.convert.converter
Class DateConverter
java.lang.Object
org.apache.wicket.util.convert.converter.AbstractConverter<java.util.Date>
org.apache.wicket.util.convert.converter.DateConverter
- All Implemented Interfaces:
- java.io.Serializable, IClusterable, IConverter<java.util.Date>
public class DateConverter
- extends AbstractConverter<java.util.Date>
Converts from Object to Date.
- Author:
- Eelco Hillenius
- See Also:
- Serialized Form
Method Summary |
java.util.Date |
convertToObject(java.lang.String value,
java.util.Locale locale)
Converts the given String value |
java.lang.String |
convertToString(java.util.Date value,
java.util.Locale locale)
Converts the given value to a string. |
java.text.DateFormat |
getDateFormat(java.util.Locale locale)
|
protected java.lang.Class<java.util.Date> |
getTargetType()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateConverter
public DateConverter()
convertToObject
public java.util.Date convertToObject(java.lang.String value,
java.util.Locale locale)
- Description copied from interface:
IConverter
- Converts the given
String
value
- Parameters:
value
- The string value to convertlocale
- The locale used to convert the value
- Returns:
- The converted value
- See Also:
IConverter.convertToObject(java.lang.String,Locale)
convertToString
public java.lang.String convertToString(java.util.Date value,
java.util.Locale locale)
- Description copied from interface:
IConverter
- Converts the given value to a string.
- Specified by:
convertToString
in interface IConverter<java.util.Date>
- Overrides:
convertToString
in class AbstractConverter<java.util.Date>
- Parameters:
value
- The value to convertlocale
- The locale used to convert the value
- Returns:
- The converted string value
- See Also:
IConverter.convertToString(Object, java.util.Locale)
getDateFormat
public java.text.DateFormat getDateFormat(java.util.Locale locale)
- Parameters:
locale
-
- Returns:
- Returns the date format.
getTargetType
protected java.lang.Class<java.util.Date> getTargetType()
- Specified by:
getTargetType
in class AbstractConverter<java.util.Date>
- Returns:
- The target type of this type converter
- See Also:
AbstractConverter.getTargetType()
Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.