org.apache.wicket.util.convert.converter
Class DateConverter

java.lang.Object
  extended by org.apache.wicket.util.convert.converter.AbstractConverter<Date>
      extended by org.apache.wicket.util.convert.converter.DateConverter
All Implemented Interfaces:
Serializable, IClusterable, IConverter<Date>

public class DateConverter
extends AbstractConverter<Date>

Converts from Object to Date.

Author:
Eelco Hillenius
See Also:
Serialized Form

Constructor Summary
DateConverter()
           
 
Method Summary
 Date convertToObject(String value, Locale locale)
          Converts the given String value
 String convertToString(Date value, Locale locale)
          Converts the given value to a string.
 DateFormat getDateFormat(Locale locale)
           
protected  Class<Date> getTargetType()
           
 
Methods inherited from class org.apache.wicket.util.convert.converter.AbstractConverter
newConversionException, parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateConverter

public DateConverter()
Method Detail

convertToObject

public Date convertToObject(String value,
                            Locale locale)
Description copied from interface: IConverter
Converts the given String value

Parameters:
value - The string value to convert
locale - The locale used to convert the value
Returns:
The converted value
See Also:
IConverter.convertToObject(java.lang.String,Locale)

convertToString

public String convertToString(Date value,
                              Locale locale)
Description copied from interface: IConverter
Converts the given value to a string.

Specified by:
convertToString in interface IConverter<Date>
Overrides:
convertToString in class AbstractConverter<Date>
Parameters:
value - The value to convert
locale - The locale used to convert the value
Returns:
The converted string value
See Also:
IConverter.convertToString(Object, java.util.Locale)

getDateFormat

public DateFormat getDateFormat(Locale locale)
Parameters:
locale -
Returns:
Returns the date format.

getTargetType

protected Class<Date> getTargetType()
Specified by:
getTargetType in class AbstractConverter<Date>
Returns:
The target type of this type converter
See Also:
AbstractConverter.getTargetType()


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.