Collector.Characteristics
Constructor and Description |
---|
SimpleCollector(Supplier<A> supplier,
BiConsumer<A,T> accumulator,
BinaryOperator<A> combiner,
Function<A,R> finisher,
Set<Collector.Characteristics> characteristics)
构造
|
SimpleCollector(Supplier<A> supplier,
BiConsumer<A,T> accumulator,
BinaryOperator<A> combiner,
Set<Collector.Characteristics> characteristics)
构造
|
Modifier and Type | Method and Description |
---|---|
BiConsumer<A,T> |
accumulator() |
Set<Collector.Characteristics> |
characteristics() |
BinaryOperator<A> |
combiner() |
Function<A,R> |
finisher() |
Supplier<A> |
supplier() |
public SimpleCollector(Supplier<A> supplier, BiConsumer<A,T> accumulator, BinaryOperator<A> combiner, Function<A,R> finisher, Set<Collector.Characteristics> characteristics)
supplier
- 创建新的结果容器函数accumulator
- 将输入元素合并到结果容器中函数combiner
- 合并两个结果容器函数(并行流使用,将多个线程产生的结果容器合并)finisher
- 将结果容器转换成最终的表示函数characteristics
- 特征值枚举public SimpleCollector(Supplier<A> supplier, BiConsumer<A,T> accumulator, BinaryOperator<A> combiner, Set<Collector.Characteristics> characteristics)
supplier
- 创建新的结果容器函数accumulator
- 将输入元素合并到结果容器中函数combiner
- 合并两个结果容器函数(并行流使用,将多个线程产生的结果容器合并)characteristics
- 特征值枚举public BiConsumer<A,T> accumulator()
accumulator
in interface Collector<T,A,R>
public Set<Collector.Characteristics> characteristics()
characteristics
in interface Collector<T,A,R>
Copyright © 2024. All rights reserved.