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 Summary
Modifier and TypeMethodDescriptiondefault @Nullable Class<? extends Transformable<T,?>> default booleanGets whether the result oftransform(Object)should be cached or not.Transforms the provided parameter into a specific type.
-
Method Details
-
transform
Transforms the provided parameter into a specific type.- Parameters:
parameter- The parameter to be transformed.- Returns:
- The transformed parameter of type T.
-
getParent
Gets the parenttransformerwhich is invoked before invokingtransform(Object)on thistransformer. If the parent is null, no parenttransformerwill be applied before invokingtransform(Object).- Returns:
- The parent
transformer, may be null. - Since:
- 3.4.0-SNAPSHOT
-
isCacheable
default boolean isCacheable()Gets whether the result oftransform(Object)should be cached or not.- Returns:
- true when its cacheable, false otherwise.
-