improve wrapper and general structure #16

Merged
tueem merged 23 commits from improve/structure into dev 2025-03-17 08:26:44 +00:00
Showing only changes of commit e3fc10a1ce - Show all commits

View File

@ -5,7 +5,7 @@ import java.util.function.Function;
public class ObjectListAggregator<O, K, V> extends ObjectAggregator<O, K, ArrayList<V>> { public class ObjectListAggregator<O, K, V> extends ObjectAggregator<O, K, ArrayList<V>> {
public ObjectListAggregator(Function<O, K> keySupplier, Function<O, V> valueConsumer) { public ObjectListAggregator(Function<O, Iterable<K>> keySupplier, Function<O, V> valueConsumer) {
super(keySupplier, super(keySupplier,
(l, o) -> l.add(valueConsumer.apply(o)), (l, o) -> l.add(valueConsumer.apply(o)),
() -> new ArrayList<>()); () -> new ArrayList<>());