Interface PropertyTransformer

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface PropertyTransformer
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 Details

    • transformProperties

      Map<String,Object> transformProperties(Map<String,? extends Object> input)
      Transform properties by creating a new map using the transformed property set.

      Implementing classes do not change the input but create a new property map.

      Parameters:
      input - must not be null.
      Returns:
      transformed properties.
    • andThen

      default PropertyTransformer andThen(PropertyTransformer after)
      Return a composed transformer function that first applies this filter, and then applies the after 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.