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.
All Implemented Interfaces:
Converter<S,T>, Function<S,T>

public final class AndThenConverter<S,X,T> extends Object implements Converter<S,T>
Converter that is the composition of 2 Converters.
Author:
Damien Carbonne
  • Constructor Details

  • Method Details

    • apply

      public T apply(S arg)
      Specified by:
      apply in interface Function<S,X>
    • getSourceClass

      public Class<S> getSourceClass()
      Specified by:
      getSourceClass in interface Converter<S,X>
      Returns:
      The class of source objects.
    • getTargetClass

      public Class<T> getTargetClass()
      Specified by:
      getTargetClass in interface Converter<S,X>
      Returns:
      The class of target objects.
    • getParams

      public Args getParams()
      Specified by:
      getParams in interface Converter<S,X>
      Returns:
      The parameters used to configure this converter.
    • getBefore

      public Converter<S,? extends X> getBefore()
      Returns:
      The converter that is applied first.
    • getAfter

      public Converter<? super X,T> getAfter()
      Returns:
      The converter that is applied second.
    • toString

      public String toString()
      Overrides:
      toString in class Object