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.
Apache Commons Collections version 3.x is being deprecated from AEMaaCS. The upgraded version 4.4 of Commons Collections is already included as replacement. Customers are advised to upgrade to this version of the library. Please note: the package name was changed to org.apache.commons.collections4. Further note that there are AEM APIs currently exposing the old collections classes; these will be updated in upcoming releases.
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
-
Method Details
-
transform
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 classIllegalArgumentException
- (runtime) if the input is invalidFunctorException
- (runtime) if the transform cannot be completed
-