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

java.lang.Object
  extended by org.apache.wicket.util.convert.converter.CalendarConverter
All Implemented Interfaces:
java.io.Serializable, IClusterable, IConverter<java.util.Calendar>

public class CalendarConverter
extends java.lang.Object
implements IConverter<java.util.Calendar>

Converts to Calendar.

See Also:
Serialized Form

Constructor Summary
CalendarConverter()
          Construct.
CalendarConverter(IConverter<java.util.Date> dateConverter)
          Construct.
 
Method Summary
 java.util.Calendar convertToObject(java.lang.String value, java.util.Locale locale)
          Converts the given String value
 java.lang.String convertToString(java.util.Calendar value, java.util.Locale locale)
          Converts the given value to a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalendarConverter

public CalendarConverter()
Construct.


CalendarConverter

public CalendarConverter(IConverter<java.util.Date> dateConverter)
Construct.

Parameters:
dateConverter - delegated converter, not null
Method Detail

convertToObject

public java.util.Calendar convertToObject(java.lang.String value,
                                          java.util.Locale locale)
Description copied from interface: IConverter
Converts the given String value

Specified by:
convertToObject in interface IConverter<java.util.Calendar>
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, java.util.Locale)

convertToString

public java.lang.String convertToString(java.util.Calendar 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.Calendar>
Parameters:
value - The value to convert
locale - The locale used to convert the value
Returns:
The converted string value
See Also:
IConverter.convertToString(java.lang.Object, java.util.Locale)


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