feat:add supplier for MyListCollector
This commit is contained in:
@@ -1,4 +1,16 @@
|
|||||||
|
package ru.test.maven.spring;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.function.BiConsumer;
|
||||||
|
import java.util.function.BinaryOperator;
|
||||||
|
import java.util.function.Function;
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
import java.util.stream.Collector;
|
||||||
public class MyListCollector <T> implements Collector<T, MyList<T>, MyList<T>>
|
public class MyListCollector <T> implements Collector<T, MyList<T>, MyList<T>>
|
||||||
{
|
{
|
||||||
|
@Override
|
||||||
|
public Supplier<MyList<T>> supplier()
|
||||||
|
{
|
||||||
|
return () -> new MyLinkedList<>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user