Class MapTransformer
java.lang.Object
org.apache.commons.collections.functors.MapTransformer
- All Implemented Interfaces:
Serializable
,Transformer
@Deprecated(since="2021-04-30")
public final class MapTransformer
extends Object
implements Transformer, Serializable
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.
Transformer implementation that returns the value held in a specified map
using the input parameter as a key.
- Since:
- Commons Collections 3.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic Transformer
getInstance
(Map map) Deprecated.Factory to create the transformer.getMap()
Deprecated.Gets the map to lookup in.Deprecated.Transforms the input to result by looking it up in aMap
.
-
Method Details
-
getInstance
Deprecated.Factory to create the transformer.If the map is null, a transformer that always returns null is returned.
- Parameters:
map
- the map, not cloned- Returns:
- the transformer
-
transform
Deprecated.Transforms the input to result by looking it up in aMap
.- Specified by:
transform
in interfaceTransformer
- Parameters:
input
- the input object to transform- Returns:
- the transformed result
-
getMap
Deprecated.Gets the map to lookup in.- Returns:
- the map
- Since:
- Commons Collections 3.1
-