Interface AttributeValueToRepresentationConverter<T,S>
-
- Type Parameters:
T- the type of the attribute to convert.S- the type of the output to produce.
- All Known Implementing Classes:
CollectionToRepresentationConverter
- 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 AttributeValueToRepresentationConverter<T,S>This interface is used to transform an attribute, described by itsAttributeDescriptorModel, leveraging a transformation function. This interface can be useful to transform lists or other types of collections.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Sconvert(AttributeDescriptorModel attribute, T item, java.util.function.Function<java.lang.Object,java.lang.Object> transformationFunction)Converts an item of typeT, described by the providedAttributeDescriptorModel, into a new object of typeSby applying the provided transformation function.
-
-
-
Method Detail
-
convert
S convert(AttributeDescriptorModel attribute, T item, java.util.function.Function<java.lang.Object,java.lang.Object> transformationFunction)
Converts an item of typeT, described by the providedAttributeDescriptorModel, into a new object of typeSby applying the provided transformation function. This function can be useful to transform lists or other types of collections, where the transformation function has to be applied individually to each element of the collection.- Parameters:
attribute- A model describing the attributeitem- The item to converttransformationFunction- Function that will be used to transform the provided item.- Returns:
- an instance of
S, converted fromTby leveraging the provided transformationFunction.
-
-