Package org.apache.commons.collections
Interface Transformer
-
- All Known Implementing Classes:
ChainedTransformer
,CloneTransformer
,ClosureTransformer
,ConstantTransformer
,ExceptionTransformer
,FactoryTransformer
,InstantiateTransformer
,InvokerTransformer
,MapTransformer
,NOPTransformer
,PredicateTransformer
,StringValueTransformer
,SwitchTransformer
@Deprecated(since="2021-04-30") public interface Transformer
Deprecated.Commons Collections 3 is in maintenance mode. Commons Collections 4 should be used instead.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 invokation, returning a constant, cloning and returning the string value.- Since:
- Commons Collections 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.lang.Object
transform(java.lang.Object input)
Deprecated.Transforms the input object (leaving it unchanged) into some output object.
-
-
-
Method Detail
-
transform
java.lang.Object transform(java.lang.Object 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:
java.lang.ClassCastException
- (runtime) if the input is the wrong classjava.lang.IllegalArgumentException
- (runtime) if the input is invalidFunctorException
- (runtime) if the transform cannot be completed
-
-