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.
This interface is used to transform an attribute, described by its
AttributeDescriptorModel,
leveraging a transformation function.
This interface can be useful to transform lists or other types of collections.-
Method Summary
Modifier and TypeMethodDescriptionConverts an item of typeT, described by the providedAttributeDescriptorModel, into a new object of typeSby applying the provided transformation function.
-
Method Details
-
convert
S convert(AttributeDescriptorModel attribute, T item, Function<Object, 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.
-