@@ -0,0 +1,1673 @@
+package com.coding4people.mosquitoreport.api.collectors;%0A%0Aimport java.util.EnumSet;%0Aimport java.util.Iterator;%0Aimport java.util.List;%0Aimport java.util.Map.Entry;%0Aimport java.util.Set;%0Aimport java.util.function.BiConsumer;%0Aimport java.util.function.BinaryOperator;%0Aimport java.util.function.Function;%0Aimport java.util.function.Supplier;%0Aimport java.util.stream.Collector;%0A%0Aimport com.fasterxml.jackson.databind.ObjectMapper;%0Aimport com.fasterxml.jackson.databind.node.ObjectNode;%0A%0Apublic class EntrySetStringStringSetToObjectNodeCollector implements Collector%3CEntry%3CString, List%3CString%3E%3E, ObjectNode, ObjectNode%3E %7B%0A%0A    private static final ObjectMapper mapper = new ObjectMapper();%0A    %0A    @Override%0A    public Supplier%3CObjectNode%3E supplier() %7B%0A        return mapper::createObjectNode;%0A    %7D%0A%0A    @Override%0A    public BiConsumer%3CObjectNode, Entry%3CString, List%3CString%3E%3E%3E accumulator() %7B%0A        return (x, y) -%3E %7B%0A            if (!y.getValue().isEmpty())%0A                x.put(y.getKey(), y.getValue().get(0));%0A        %7D;%0A    %7D%0A%0A    @Override%0A    public BinaryOperator%3CObjectNode%3E combiner() %7B%0A        return (x, y) -%3E %7B%0A            final Iterator%3CString%3E iterator = x.fieldNames();%0A            %0A            while (iterator.hasNext()) %7B%0A                String fieldName = iterator.next();%0A                y.put(fieldName, x.get(fieldName).asText());%0A            %7D%0A            %0A            return y;%0A        %7D;%0A    %7D%0A%0A    @Override%0A    public Function%3CObjectNode, ObjectNode%3E finisher() %7B%0A        return x -%3E x;%0A    %7D%0A%0A    @Override%0A    public Set%3Cjava.util.stream.Collector.Characteristics%3E characteristics() %7B%0A        return EnumSet.of(Characteristics.UNORDERED);%0A    %7D%0A%7D%0A

Create EntrySetStringStringSetToObjectNodeCollector