Interface Collector<T,A,R>


public interface Collector<T,A,R>
How Stream.collect(Collector) folds the elements of a stream into a result: a container to start from, a step per element, a way to merge two containers and a last step that turns the container into the result.