public final class AdaptableCollector<T,A,R> extends Object implements Collector<T,A,R>
Collector which offers some means for adapting it into new Collectors,
in particular the ability to map the result.Collector.Characteristics| Modifier and Type | Method and Description |
|---|---|
BiConsumer<A,T> |
accumulator() |
<M> AdaptableCollector<T,A,M> |
andThen(Function<? super R,M> resultMapper)
Create a new
Collector which maps the resulting container to something else
using the given resultMapper Function. |
Set<Collector.Characteristics> |
characteristics() |
BinaryOperator<A> |
combiner() |
Function<A,R> |
finisher() |
static <T,A,R> AdaptableCollector<T,A,R> |
of(Supplier<A> supplier,
BiConsumer<A,T> accumulator,
BinaryOperator<A> combiner,
Function<A,R> finisher,
Collector.Characteristics... characteristics) |
static <T,A,R> AdaptableCollector<T,A,R> |
of(Supplier<A> supplier,
BiConsumer<A,T> accumulator,
BinaryOperator<A> combiner,
Function<A,R> finisher,
Set<Collector.Characteristics> characteristics) |
Supplier<A> |
supplier() |
public static <T,A,R> AdaptableCollector<T,A,R> of(Supplier<A> supplier, BiConsumer<A,T> accumulator, BinaryOperator<A> combiner, Function<A,R> finisher, Set<Collector.Characteristics> characteristics)
public static <T,A,R> AdaptableCollector<T,A,R> of(Supplier<A> supplier, BiConsumer<A,T> accumulator, BinaryOperator<A> combiner, Function<A,R> finisher, Collector.Characteristics... characteristics)
public <M> AdaptableCollector<T,A,M> andThen(Function<? super R,M> resultMapper)
Collector which maps the resulting container to something else
using the given resultMapper Function.M - The new result type after applying the mapper functions.resultMapper - the function used to map the collector's resultpublic BiConsumer<A,T> accumulator()
accumulator in interface Collector<T,A,R>public Set<Collector.Characteristics> characteristics()
characteristics in interface Collector<T,A,R>Copyright © 2016 Digipost. All rights reserved.