Interface Transformable<R,T>

Type Parameters:
R - The type to which the parameter is transformed.
T - The type from which the transformer transforms the param.
All Known Implementing Classes:
BooleanTransformer, ByteTransformer, DoubleTransformer, FloatTransformer, IntTransformer, LongTransformer, ShortTransformer

public interface Transformable<R,T>
Interface representing a transformation operation. Classes implementing this interface are capable of transforming a given parameter into a specific type.
Since:
3.0.2-SNAPSHOT
  • Method Details

    • transform

      R transform(T parameter)
      Transforms the provided parameter into a specific type.
      Parameters:
      parameter - The parameter to be transformed.
      Returns:
      The transformed parameter of type T.
    • getParent

      @Nullable default @Nullable Class<? extends Transformable<T,?>> getParent()
      Gets the parent transformer which is invoked before invoking transform(Object) on this transformer. If the parent is null, no parent transformer will be applied before invoking transform(Object).
      Returns:
      The parent transformer, may be null.
      Since:
      3.4.0-SNAPSHOT
    • isCacheable

      default boolean isCacheable()
      Gets whether the result of transform(Object) should be cached or not.
      Returns:
      true when its cacheable, false otherwise.