ModelMapper - how calculate a value from source and set it to destination
问题 I'm trying to use ModelMapper for mapping source to destination. In my specific case, in the source class there is a property (List of Review), where I have to sum by rating and set this value to destination class. So I've tried with converter, but it doesn't working. Converter<List<Review>, Double> sumReviewsRating = new AbstractConverter<List<Review>, Double>() { @Override protected Double convert(List<Review> reviews) { if(reviews!=null){ return reviews.stream().mapToDouble(Review: