org.databene.commons.converter
Class ConverterChain<S,T>
java.lang.Object
org.databene.commons.converter.MultiConverterWrapper
org.databene.commons.converter.ConverterChain<S,T>
- All Implemented Interfaces:
- Converter<S,T>, ThreadAware
- Direct Known Subclasses:
- DateString2DurationConverter
public class ConverterChain<S,T>
- extends MultiConverterWrapper
- implements Converter<S,T>
Aggregates other (sub) converters and implements conversion by subsequent invocation of the sub generators,
each converting the result of the preceding converter.
Created: 13.05.2005 17:43:04
- Since:
- 0.1
- Author:
- Volker Bergmann
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConverterChain
public ConverterChain(Converter... components)
getSourceType
public java.lang.Class<S> getSourceType()
- Specified by:
getSourceType in interface Converter<S,T>
getTargetType
public java.lang.Class<T> getTargetType()
- Specified by:
getTargetType in interface Converter<S,T>
convert
public T convert(java.lang.Object source)
throws ConversionException
- Description copied from interface:
Converter
- Concerts an object of type S to an object of type T
- Specified by:
convert in interface Converter<S,T>
- Parameters:
source - the object to convert
- Returns:
- the converted object
- Throws:
ConversionException - if the conversion fails
Copyright © 2010. All Rights Reserved.