Class 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 Detail

      • AndThenConverter

        public AndThenConverter​(Converter<S,​? extends X> before,
                                Converter<? super X,​T> after)
    • Method Detail

      • apply

        public T apply​(S arg)
        Specified by:
        apply in interface Function<S,​X>
      • 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.