Package cdc.converters
Class AndThenConverter<S,X,T>
- java.lang.Object
-
- cdc.converters.AndThenConverter<S,X,T>
-
- Type Parameters:
S- The source/input type of first and composed converter.X- The intermediate type.
It is compliant with target/result type if first converter.
It is compliant with source/input type of second converter.T- The target/result type of second and composed converter.
public final class AndThenConverter<S,X,T> extends Object implements Converter<S,T>
Converter that is the composition of 2 Converters.- Author:
- Damien Carbonne
-
-
Field Summary
-
Fields inherited from interface cdc.converters.Converter
META_FARGS, SOURCE_CLASS, TARGET_CLASS
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tapply(S arg)Converter<? super X,T>getAfter()Converter<S,? extends X>getBefore()ArgsgetParams()Class<S>getSourceClass()Class<T>getTargetClass()StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface cdc.converters.Converter
adapt, andThen, andThenRaw, applyRaw, areCompliantSourceAndTargetClasses, areMatchingSourceAndTargetClasses, cast, compose, composeRaw, getWrappedSourceClass, getWrappedTargetClass, isCompliantSourceClass, isCompliantTargetClass, isMatchingSourceClass, isMatchingTargetClass, orElse, orElseRaw
-
-
-
-
Method Detail
-
getSourceClass
public Class<S> getSourceClass()
- Specified by:
getSourceClassin interfaceConverter<S,X>- Returns:
- The class of source objects.
-
getTargetClass
public Class<T> getTargetClass()
- Specified by:
getTargetClassin interfaceConverter<S,X>- Returns:
- The class of target objects.
-
getParams
public Args getParams()
-
getBefore
public Converter<S,? extends X> getBefore()
- Returns:
- The converter that is applied first.
-
-