Interface Transformer<T,R>

Type Parameters:
T - the input type to the transformer
R - the output type from the transformer
All Superinterfaces:
Function<T,R>
All Known Implementing Classes:
ChainedTransformer, CloneTransformer, ClosureTransformer, ConstantTransformer, ExceptionTransformer, FactoryTransformer, IfTransformer, InstantiateTransformer, InvokerTransformer, MapTransformer, NOPTransformer, PredicateTransformer, StringValueTransformer, SwitchTransformer

@Deprecated public interface Transformer<T,R> extends Function<T,R>
Deprecated.
Defines a functor interface implemented by classes that transform one object into another.

A Transformer converts the input object to the output object. The input object should be left unchanged. Transformers are typically used for type conversions, or extracting data from an object.

Standard implementations of common transformers are provided by TransformerUtils. These include method invocation, returning a constant, cloning and returning the string value.

Since:
1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    default R
    apply(T t)
    Deprecated.
     
    transform(T input)
    Deprecated.
    Transforms the input object (leaving it unchanged) into some output object.

    Methods inherited from interface java.util.function.Function

    andThen, compose
  • Method Details

    • apply

      default R apply(T t)
      Deprecated.
      Specified by:
      apply in interface Function<T,R>
    • transform

      R transform(T input)
      Deprecated.
      Transforms the input object (leaving it unchanged) into some output object.
      Parameters:
      input - the object to be transformed, should be left unchanged
      Returns:
      a transformed object
      Throws:
      ClassCastException - (runtime) if the input is the wrong class
      IllegalArgumentException - (runtime) if the input is invalid
      FunctorException - (runtime) if the transform cannot be completed