Class CollectionToRepresentationConverter

    • Constructor Detail

      • CollectionToRepresentationConverter

        public CollectionToRepresentationConverter()
    • Method Detail

      • convert

        public java.util.Collection<java.lang.Object> convert​(AttributeDescriptorModel attribute,
                                                              java.util.Collection<java.lang.Object> collection,
                                                              java.util.function.Function<java.lang.Object,​java.lang.Object> transformationFunction)
        Description copied from interface: AttributeValueToRepresentationConverter
        Converts an item of type T, described by the provided AttributeDescriptorModel, into a new object of type S by 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.
        Specified by:
        convert in interface AttributeValueToRepresentationConverter<java.util.Collection<java.lang.Object>,​java.util.Collection<java.lang.Object>>
        Parameters:
        attribute - A model describing the attribute
        collection - The item to convert
        transformationFunction - Function that will be used to transform the provided item.
        Returns:
        an instance of S, converted from T by leveraging the provided transformationFunction.
      • setValidationErrorsProvider

        public void setValidationErrorsProvider​(ValidationErrorsProvider validationErrorsProvider)