feat: add accumulator to MyListCollector

This commit is contained in:
Гаджикурбанов Темирлан
2026-08-29 11:13:45 +03:00
parent e4a48381f0
commit 501236f881
@@ -13,4 +13,9 @@ public class MyListCollector <T> implements Collector<T, MyList<T>, MyList<T>>
{
return () -> new MyLinkedList<>();
}
@Override
public BiConsumer<MyList<T>, T> accumulator() {
return (list, element) -> list.add(element);
}
}