org.apache.commons.convert
Class DateTimeConverters.DateToCalendar

java.lang.Object
  extended by org.apache.commons.convert.AbstractConverter<S,T>
      extended by org.apache.commons.convert.AbstractLocalizedConverter<S,T>
          extended by org.apache.commons.convert.DateTimeConverters.GenericLocalizedConverter<Date,Calendar>
              extended by org.apache.commons.convert.DateTimeConverters.DateToCalendar
All Implemented Interfaces:
Converter<Date,Calendar>, ConverterLoader, LocalizedConverter<Date,Calendar>
Enclosing class:
DateTimeConverters

public static class DateTimeConverters.DateToCalendar
extends DateTimeConverters.GenericLocalizedConverter<Date,Calendar>

An object that converts a Date to a Calendar.


Constructor Summary
DateTimeConverters.DateToCalendar()
           
 
Method Summary
 Calendar convert(Date obj, Locale locale, TimeZone timeZone, String formatString)
          Converts obj to T.
 
Methods inherited from class org.apache.commons.convert.DateTimeConverters.GenericLocalizedConverter
convert, convert
 
Methods inherited from class org.apache.commons.convert.AbstractConverter
canConvert, getSourceClass, getTargetClass, loadConverters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.convert.Converter
canConvert, getSourceClass, getTargetClass
 

Constructor Detail

DateTimeConverters.DateToCalendar

public DateTimeConverters.DateToCalendar()
Method Detail

convert

public Calendar convert(Date obj,
                        Locale locale,
                        TimeZone timeZone,
                        String formatString)
                 throws ConversionException
Description copied from interface: LocalizedConverter
Converts obj to T.

Parameters:
obj - The source Object to convert
locale - The locale used for conversion - must not be null
timeZone - The time zone used for conversion - must not be null
formatString - Optional formatting string
Returns:
The converted Object
Throws:
ConversionException


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.