public final class Collectors extends Object
Modifier and Type | Method and Description |
---|---|
static <T> Collector<T,?,Double> |
averagingDouble(ToDoubleFunction<? super T> mapper) |
static <T> Collector<T,?,Double> |
averagingInt(ToIntFunction<? super T> mapper) |
static <T> Collector<T,?,Double> |
averagingLong(ToLongFunction<? super T> mapper) |
static <T,A,R,RR> Collector<T,A,RR> |
collectingAndThen(Collector<T,A,R> downstream,
Function<R,RR> finisher) |
static <T> Collector<T,?,Long> |
counting() |
static <T,K> Collector<T,?,Map<K,List<T>>> |
groupingBy(Function<? super T,? extends K> classifier) |
static <T,K,A,D> Collector<T,?,Map<K,D>> |
groupingBy(Function<? super T,? extends K> classifier,
Collector<? super T,A,D> downstream) |
static <T,K,D,A,M extends Map<K,D>> |
groupingBy(Function<? super T,? extends K> classifier,
Supplier<M> mapFactory,
Collector<? super T,A,D> downstream) |
static Collector<CharSequence,?,String> |
joining() |
static Collector<CharSequence,?,String> |
joining(CharSequence delimiter) |
static Collector<CharSequence,?,String> |
joining(CharSequence delimiter,
CharSequence prefix,
CharSequence suffix) |
static <T,U,A,R> Collector<T,?,R> |
mapping(Function<? super T,? extends U> mapper,
Collector<? super U,A,R> downstream) |
static <T> Collector<T,?,Optional<T>> |
maxBy(Comparator<? super T> comparator) |
static <T> Collector<T,?,Optional<T>> |
minBy(Comparator<? super T> comparator) |
static <T> Collector<T,?,Map<Boolean,List<T>>> |
partitioningBy(Predicate<? super T> predicate) |
static <T,D,A> Collector<T,?,Map<Boolean,D>> |
partitioningBy(Predicate<? super T> predicate,
Collector<? super T,A,D> downstream) |
static <T> Collector<T,?,Optional<T>> |
reducing(BinaryOperator<T> op) |
static <T> Collector<T,?,T> |
reducing(T identity,
BinaryOperator<T> op) |
static <T,U> Collector<T,?,U> |
reducing(U identity,
Function<? super T,? extends U> mapper,
BinaryOperator<U> op) |
static <T> Collector<T,?,DoubleSummaryStatistics> |
summarizingDouble(ToDoubleFunction<? super T> mapper) |
static <T> Collector<T,?,IntSummaryStatistics> |
summarizingInt(ToIntFunction<? super T> mapper) |
static <T> Collector<T,?,LongSummaryStatistics> |
summarizingLong(ToLongFunction<? super T> mapper) |
static <T> Collector<T,?,Double> |
summingDouble(ToDoubleFunction<? super T> mapper) |
static <T> Collector<T,?,Integer> |
summingInt(ToIntFunction<? super T> mapper) |
static <T> Collector<T,?,Long> |
summingLong(ToLongFunction<? super T> mapper) |
static <T,C extends Collection<T>> |
toCollection(Supplier<C> collectionFactory) |
static <T> Collector<T,?,List<T>> |
toList() |
static <T,K,U> Collector<T,?,Map<K,U>> |
toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends U> valueMapper) |
static <T,K,U> Collector<T,?,Map<K,U>> |
toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends U> valueMapper,
BinaryOperator<U> mergeFunction) |
static <T,K,U,M extends Map<K,U>> |
toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends U> valueMapper,
BinaryOperator<U> mergeFunction,
Supplier<M> mapSupplier) |
static <T> Collector<T,?,Set<T>> |
toSet() |
public static <T> Collector<T,?,Double> averagingDouble(ToDoubleFunction<? super T> mapper)
public static <T> Collector<T,?,Double> averagingInt(ToIntFunction<? super T> mapper)
public static <T> Collector<T,?,Double> averagingLong(ToLongFunction<? super T> mapper)
public static <T,A,R,RR> Collector<T,A,RR> collectingAndThen(Collector<T,A,R> downstream, Function<R,RR> finisher)
public static <T,K> Collector<T,?,Map<K,List<T>>> groupingBy(Function<? super T,? extends K> classifier)
public static <T,K,A,D> Collector<T,?,Map<K,D>> groupingBy(Function<? super T,? extends K> classifier, Collector<? super T,A,D> downstream)
public static <T,K,D,A,M extends Map<K,D>> Collector<T,?,M> groupingBy(Function<? super T,? extends K> classifier, Supplier<M> mapFactory, Collector<? super T,A,D> downstream)
public static Collector<CharSequence,?,String> joining()
public static Collector<CharSequence,?,String> joining(CharSequence delimiter)
public static Collector<CharSequence,?,String> joining(CharSequence delimiter, CharSequence prefix, CharSequence suffix)
public static <T,U,A,R> Collector<T,?,R> mapping(Function<? super T,? extends U> mapper, Collector<? super U,A,R> downstream)
public static <T> Collector<T,?,Optional<T>> maxBy(Comparator<? super T> comparator)
public static <T> Collector<T,?,Optional<T>> minBy(Comparator<? super T> comparator)
public static <T> Collector<T,?,Map<Boolean,List<T>>> partitioningBy(Predicate<? super T> predicate)
public static <T,D,A> Collector<T,?,Map<Boolean,D>> partitioningBy(Predicate<? super T> predicate, Collector<? super T,A,D> downstream)
public static <T> Collector<T,?,Optional<T>> reducing(BinaryOperator<T> op)
public static <T> Collector<T,?,T> reducing(T identity, BinaryOperator<T> op)
public static <T,U> Collector<T,?,U> reducing(U identity, Function<? super T,? extends U> mapper, BinaryOperator<U> op)
public static <T> Collector<T,?,DoubleSummaryStatistics> summarizingDouble(ToDoubleFunction<? super T> mapper)
public static <T> Collector<T,?,IntSummaryStatistics> summarizingInt(ToIntFunction<? super T> mapper)
public static <T> Collector<T,?,LongSummaryStatistics> summarizingLong(ToLongFunction<? super T> mapper)
public static <T> Collector<T,?,Double> summingDouble(ToDoubleFunction<? super T> mapper)
public static <T> Collector<T,?,Integer> summingInt(ToIntFunction<? super T> mapper)
public static <T> Collector<T,?,Long> summingLong(ToLongFunction<? super T> mapper)
public static <T,C extends Collection<T>> Collector<T,?,C> toCollection(Supplier<C> collectionFactory)
public static <T,K,U> Collector<T,?,Map<K,U>> toMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends U> valueMapper)
public static <T,K,U> Collector<T,?,Map<K,U>> toMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends U> valueMapper, BinaryOperator<U> mergeFunction)
public static <T,K,U,M extends Map<K,U>> Collector<T,?,M> toMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends U> valueMapper, BinaryOperator<U> mergeFunction, Supplier<M> mapSupplier)
Copyright © 2018. All rights reserved.