org.apache.commons.convert
Class DateTimeConverters.GenericLocalizedConverter<S,T>

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<S,T>
All Implemented Interfaces:
Converter<S,T>, ConverterLoader, LocalizedConverter<S,T>
Direct Known Subclasses:
DateTimeConverters.DateToCalendar
Enclosing class:
DateTimeConverters

public abstract static class DateTimeConverters.GenericLocalizedConverter<S,T>
extends AbstractLocalizedConverter<S,T>


Constructor Summary
protected DateTimeConverters.GenericLocalizedConverter(Class<S> sourceClass, Class<T> targetClass)
           
 
Method Summary
 T convert(S obj)
          Converts obj to T.
 T convert(S obj, Locale locale, TimeZone timeZone)
          Converts obj to T.
 
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.LocalizedConverter
convert
 
Methods inherited from interface org.apache.commons.convert.Converter
canConvert, getSourceClass, getTargetClass
 

Constructor Detail

DateTimeConverters.GenericLocalizedConverter

protected DateTimeConverters.GenericLocalizedConverter(Class<S> sourceClass,
                                                       Class<T> targetClass)
Method Detail

convert

public T convert(S obj)
          throws ConversionException
Description copied from interface: Converter
Converts obj to T.

Parameters:
obj - The source Object to convert
Returns:
The converted Object
Throws:
ConversionException

convert

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

Specified by:
convert in interface LocalizedConverter<S,T>
Overrides:
convert in class AbstractLocalizedConverter<S,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
Returns:
The converted Object
Throws:
ConversionException


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