Interface PropertyTransformer
- All Known Implementing Classes:
PropertyTransformers.KeyPrefixPropertyTransformer
,PropertyTransformers.NoOpPropertyTransformer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Strategy interface to transform properties to a new key-value
Map
in a
functional style. Property transformation can remap property names, adjust values or
change the property map entirely without changing the input.
Implementors usually transform property names to target property names by retaining the value.
- Author:
- Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptiondefault PropertyTransformer
andThen
(PropertyTransformer after) Return a composed transformer function that first applies this filter, and then applies theafter
transformer.transformProperties
(Map<String, ? extends Object> input) Transform properties by creating a new map using the transformed property set.
-
Method Details
-
transformProperties
Transform properties by creating a new map using the transformed property set.Implementing classes do not change the
input
but create a newproperty map
.- Parameters:
input
- must not be null.- Returns:
- transformed properties.
-
andThen
Return a composed transformer function that first applies this filter, and then applies theafter
transformer.- Parameters:
after
- the transformer to apply after this transformer is applied.- Returns:
- a composed transformer that first applies this function and then applies
the
after
transformer.
-