Class Collectors
- Direct Known Subclasses:
Collectors.MoreCollectors
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Collector<T,
?, u.Optional<BigDecimal>> averagingBigDecimal
(Function<? super T, BigDecimal> mapper) static <T> Collector<T,
?, BigDecimal> averagingBigDecimalOrElseThrow
(Function<? super T, BigDecimal> mapper) static <T> Collector<T,
?, u.Optional<BigDecimal>> averagingBigInteger
(Function<? super T, BigInteger> mapper) static <T> Collector<T,
?, BigDecimal> averagingBigIntegerOrElseThrow
(Function<? super T, BigInteger> mapper) static <T> Collector<T,
?, u.OptionalDouble> averagingDouble
(ToDoubleFunction<? super T> mapper) averagingDoubleOrElseThrow
(ToDoubleFunction<? super T> mapper) static <T> Collector<T,
?, u.OptionalDouble> averagingInt
(ToIntFunction<? super T> mapper) averagingIntOrElseThrow
(ToIntFunction<? super T> mapper) static <T> Collector<T,
?, u.OptionalDouble> averagingLong
(ToLongFunction<? super T> mapper) averagingLongOrElseThrow
(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,
A, R> Collector<T, A, R> collectingOrElseGetIfEmpty
(Collector<T, A, R> collector, Supplier<? extends R> defaultForEmpty) static <T,
A, R> Collector<T, A, R> collectingOrElseIfEmpty
(Collector<T, A, R> collector, R defaultForEmpty) static <T,
A, R> Collector<T, A, R> collectingOrElseThrowIfEmpty
(Collector<T, A, R> collector) static <T,
A, R> Collector<T, A, R> collectingOrElseThrowIfEmpty
(Collector<T, A, R> collector, Supplier<? extends RuntimeException> exceptionSupplier) static <T,
A, R> Collector<T, A, u.Optional<R>> collectingOrEmpty
(Collector<T, A, R> collector) static Collector<CharSequence,
?, String> It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.static Collector<CharSequence,
?, String> It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.counting()
countingBy
(Function<? super T, ? extends K> keyMapper) countingBy
(Function<? super T, ? extends K> keyMapper, Supplier<? extends M> mapFactory) countingToIntBy
(Function<? super T, ? extends K> keyMapper) countingToIntBy
(Function<? super T, ? extends K> keyMapper, Supplier<? extends M> mapFactory) distinctBy
(Function<? super T, ?> keyExtractor) It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.static <T,
C extends Collection<T>>
Collector<T,?, C> distinctBy
(Function<? super T, ?> keyExtractor, Supplier<? extends C> suppplier) distinctCount
(Function<? super T, ?> keyExtractor) It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.static <T,
A, R> Collector<T, ?, R> It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.static <T> Collector<T,
?, u.Optional<T>> first()
Only works for sequential Stream.first
(int n) Only works for sequential Stream.flatMaping
(Function<? super T, ? extends Stream<? extends T2>> flatMapper, BiFunction<? super T, ? super T2, ? extends U> mapper) static <T,
T2, U, A, R>
Collector<T,?, R> flatMaping
(Function<? super T, ? extends Stream<? extends T2>> flatMapper, BiFunction<? super T, ? super T2, ? extends U> mapper, Collector<? super U, A, R> downstream) flatMaping
(Function<? super T, ? extends Stream<? extends U>> mapper) static <T,
U, A, R> Collector<T, ?, R> flatMaping
(Function<? super T, ? extends Stream<? extends U>> mapper, Collector<? super U, A, R> downstream) static <T,
K, V> Collector<T, ?, ListMultimap<K, V>> flatMapingKeyToMultimap
(Function<? super T, Stream<? extends K>> flatKeyMapper, Function<? super T, V> valueMapper) static <T,
K, V, C extends Collection<V>, M extends Multimap<K, V, C>>
Collector<T,?, M> flatMapingKeyToMultimap
(Function<? super T, Stream<? extends K>> flatKeyMapper, Function<? super T, V> valueMapper, Supplier<? extends M> mapFactory) static <T,
K, V> Collector<T, ?, ListMultimap<K, V>> flatMapingValueToMultimap
(Function<? super T, K> keyMapper, Function<? super T, ? extends Stream<? extends V>> flatValueMapper) static <T,
K, V, C extends Collection<V>, M extends Multimap<K, V, C>>
Collector<T,?, M> flatMapingValueToMultimap
(Function<? super T, K> keyMapper, Function<? super T, ? extends Stream<? extends V>> flatValueMapper, Supplier<? extends M> mapFactory) flatmapping
(Function<? super T, ? extends Collection<? extends T2>> flatMapper, BiFunction<? super T, ? super T2, ? extends U> mapper) static <T,
T2, U, A, R>
Collector<T,?, R> flatmapping
(Function<? super T, ? extends Collection<? extends T2>> flatMapper, BiFunction<? super T, ? super T2, ? extends U> mapper, Collector<? super U, A, R> downstream) flatmapping
(Function<? super T, ? extends Collection<? extends U>> mapper) static <T,
U, A, R> Collector<T, ?, R> flatmapping
(Function<? super T, ? extends Collection<? extends U>> mapper, Collector<? super U, A, R> downstream) static <T,
K, V> Collector<T, ?, ListMultimap<K, V>> flatmappingKeyToMultimap
(Function<? super T, ? extends Collection<? extends K>> flatKeyMapper, Function<? super T, V> valueMapper) static <T,
K, V, C extends Collection<V>, M extends Multimap<K, V, C>>
Collector<T,?, M> flatmappingKeyToMultimap
(Function<? super T, ? extends Collection<? extends K>> flatKeyMapper, Function<? super T, V> valueMapper, Supplier<? extends M> mapFactory) static <T,
K, V> Collector<T, ?, ListMultimap<K, V>> flatmappingValueToMultimap
(Function<? super T, K> keyMapper, Function<? super T, ? extends Collection<? extends V>> flatValueMapper) static <T,
K, V, C extends Collection<V>, M extends Multimap<K, V, C>>
Collector<T,?, M> flatmappingValueToMultimap
(Function<? super T, K> keyMapper, Function<? super T, ? extends Collection<? extends V>> flatValueMapper, Supplier<? extends M> mapFactory) flattMaping
(Function<? super T, ? extends Stream<? extends T2>> flatMapper, BiFunction<? super T, ? super T2, ? extends U> mapper) static <T,
T2, U, A, R>
Collector<T,?, R> flattMaping
(Function<? super T, ? extends Stream<? extends T2>> flatMapper, BiFunction<? super T, ? super T2, ? extends U> mapper, Collector<? super U, A, R> downstream) flattMaping
(Function<? super T, ? extends Stream<? extends U>> mapper) static <T,
U, A, R> Collector<T, ?, R> flattMaping
(Function<? super T, ? extends Stream<? extends U>> mapper, Collector<? super U, A, R> downstream) static <T,
K, V> Collector<T, ?, ListMultimap<K, V>> flattMapingKeyToMultimap
(Function<? super T, Stream<? extends K>> flatKeyMapper, Function<? super T, V> valueMapper) static <T,
K, V, C extends Collection<V>, M extends Multimap<K, V, C>>
Collector<T,?, M> flattMapingKeyToMultimap
(Function<? super T, Stream<? extends K>> flatKeyMapper, Function<? super T, V> valueMapper, Supplier<? extends M> mapFactory) static <T,
K, V> Collector<T, ?, ListMultimap<K, V>> flattMapingValueToMultimap
(Function<? super T, K> keyMapper, Function<? super T, ? extends Stream<? extends V>> flatValueMapper) static <T,
K, V, C extends Collection<V>, M extends Multimap<K, V, C>>
Collector<T,?, M> flattMapingValueToMultimap
(Function<? super T, K> keyMapper, Function<? super T, ? extends Stream<? extends V>> flatValueMapper, Supplier<? extends M> mapFactory) groupingBy
(Function<? super T, ? extends K> keyMapper) groupingBy
(Function<? super T, ? extends K> keyMapper, Supplier<? extends M> mapFactory) groupingBy
(Function<? super T, ? extends K> keyMapper, Collector<? super T, A, D> downstream) groupingBy
(Function<? super T, ? extends K> keyMapper, Collector<? super T, A, D> downstream, Supplier<? extends M> mapFactory) static <T,
K> Collector<T, ?, ConcurrentMap<K, List<T>>> groupingByConcurrent
(Function<? super T, ? extends K> keyMapper) static <T,
K, M extends ConcurrentMap<K, List<T>>>
Collector<T,?, M> groupingByConcurrent
(Function<? super T, ? extends K> keyMapper, Supplier<? extends M> mapFactory) static <T,
K, A, D> Collector<T, ?, ConcurrentMap<K, D>> groupingByConcurrent
(Function<? super T, ? extends K> keyMapper, Collector<? super T, A, D> downstream) static <T,
K, A, D, M extends ConcurrentMap<K, D>>
Collector<T,?, M> groupingByConcurrent
(Function<? super T, ? extends K> keyMapper, Collector<? super T, A, D> downstream, Supplier<? extends M> mapFactory) 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> Collector<T,
?, u.Optional<T>> last()
Only works for sequential Stream.last
(int n) Only works for sequential Stream.static <T,
U, A, R> Collector<T, ?, R> static <T extends Comparable<? super T>>
Collector<T,?, u.Optional<T>> max()
static <T> Collector<T,
?, u.Optional<T>> max
(Comparator<? super T> comparator) static <T extends Comparable<? super T>>
Collector<T,?, List<T>> maxAll()
It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.maxAll
(Comparator<? super T> comparator) It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.maxAll
(Comparator<? super T> comparator, int atMostSize) static <T,
R> Collector<T, ?, R> maxAll
(Comparator<? super T> comparator, Collector<? super T, ?, R> downstream) It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.static <T extends Comparable,
R>
Collector<T,?, R> It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.static <T,
R> Collector<T, ?, u.Optional<Pair<T, R>>> maxAlll
(Comparator<? super T> comparator, Collector<? super T, ?, R> downstream) static <T,
R, RR> Collector<T, ?, RR> maxAlll
(Comparator<? super T> comparator, Collector<? super T, ?, R> downstream, Function<u.Optional<Pair<T, R>>, RR> finisher) static <T extends Comparable,
R>
Collector<T,?, u.Optional<Pair<T, R>>> static <T> Collector<T,
?, u.Optional<T>> maxBy
(Function<? super T, ? extends Comparable> keyMapper) static <T> Collector<T,
?, T> maxByOrElseGet
(Function<? super T, ? extends Comparable> keyMapper, Supplier<? extends T> supplierForEmpty) static <T> Collector<T,
?, T> maxByOrElseThrow
(Function<? super T, ? extends Comparable> keyMapper) static <T> Collector<T,
?, T> maxByOrElseThrow
(Function<? super T, ? extends Comparable> keyMapper, Supplier<? extends RuntimeException> exceptionSupplier) static <T> Collector<T,
?, T> maxOrElse
(Comparator<? super T> comparator, T defaultForEmpty) static <T extends Comparable<? super T>>
Collector<T,?, T> maxOrElse
(T defaultForEmpty) static <T> Collector<T,
?, T> maxOrElseGet
(Comparator<? super T> comparator, Supplier<? extends T> supplierForEmpty) static <T extends Comparable<? super T>>
Collector<T,?, T> maxOrElseGet
(Supplier<? extends T> supplierForEmpty) static <T extends Comparable<? super T>>
Collector<T,?, T> static <T> Collector<T,
?, T> maxOrElseThrow
(Comparator<? super T> comparator) static <T> Collector<T,
?, T> maxOrElseThrow
(Comparator<? super T> comparator, Supplier<? extends RuntimeException> exceptionSupplier) static <T extends Comparable<? super T>>
Collector<T,?, u.Optional<T>> min()
static <T> Collector<T,
?, u.Optional<T>> min
(Comparator<? super T> comparator) static <T extends Comparable<? super T>>
Collector<T,?, List<T>> minAll()
It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.minAll
(Comparator<? super T> comparator) It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.minAll
(Comparator<? super T> comparator, int atMostSize) static <T,
A, R> Collector<T, ?, R> minAll
(Comparator<? super T> comparator, Collector<T, A, R> downstream) It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.static <T extends Comparable,
A, R>
Collector<T,?, R> It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.static <T,
R> Collector<T, ?, u.Optional<Pair<T, R>>> minAlll
(Comparator<? super T> comparator, Collector<? super T, ?, R> downstream) static <T,
R, RR> Collector<T, ?, RR> minAlll
(Comparator<? super T> comparator, Collector<? super T, ?, R> downstream, Function<u.Optional<Pair<T, R>>, RR> finisher) static <T extends Comparable,
R>
Collector<T,?, u.Optional<Pair<T, R>>> static <T> Collector<T,
?, u.Optional<T>> minBy
(Function<? super T, ? extends Comparable> keyMapper) static <T> Collector<T,
?, T> minByOrElseGet
(Function<? super T, ? extends Comparable> keyMapper, Supplier<? extends T> supplierForEmpty) static <T> Collector<T,
?, T> minByOrElseThrow
(Function<? super T, ? extends Comparable> keyMapper) static <T> Collector<T,
?, T> minByOrElseThrow
(Function<? super T, ? extends Comparable> keyMapper, Supplier<? extends RuntimeException> exceptionSupplier) static <T extends Comparable>
Collector<T,?, u.Optional<Pair<T, T>>> minMax()
static <T> Collector<T,
?, u.Optional<Pair<T, T>>> minMax
(Comparator<? super T> comparator) static <T,
R> Collector<T, ?, u.Optional<R>> minMax
(Comparator<? super T> comparator, BiFunction<? super T, ? super T, ? extends R> finisher) It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.static <T> Collector<T,
?, u.Optional<Pair<T, T>>> minMaxBy
(Function<? super T, ? extends Comparable> keyMapper) static <T,
R> Collector<T, ?, u.Optional<R>> minMaxBy
(Function<? super T, ? extends Comparable> keyMapper, BiFunction<? super T, ? super T, ? extends R> finisher) minMaxOrElseGet
(Comparator<? super T> comparator, Supplier<Pair<? extends T, ? extends T>> supplierForEmpty) static <T extends Comparable<? super T>>
Collector<T,?, Pair<T, T>> minMaxOrElseGet
(Supplier<Pair<? extends T, ? extends T>> supplierForEmpty) static <T extends Comparable<? super T>>
Collector<T,?, Pair<T, T>> minMaxOrElseThrow
(Comparator<? super T> comparator) static <T> Collector<T,
?, T> minOrElse
(Comparator<? super T> comparator, T defaultForEmpty) static <T extends Comparable<? super T>>
Collector<T,?, T> minOrElse
(T defaultForEmpty) static <T> Collector<T,
?, T> minOrElseGet
(Comparator<? super T> comparator, Supplier<? extends T> supplierForEmpty) static <T extends Comparable<? super T>>
Collector<T,?, T> minOrElseGet
(Supplier<? extends T> supplierForEmpty) static <T extends Comparable<? super T>>
Collector<T,?, T> static <T> Collector<T,
?, T> minOrElseThrow
(Comparator<? super T> comparator) static <T> Collector<T,
?, T> minOrElseThrow
(Comparator<? super T> comparator, Supplier<? extends RuntimeException> exceptionSupplier) static <T> Collector<T,
?, u.Optional<T>> onlyOne()
TooManyElementsException
is threw if there are more than one values are collected.static <T> Collector<T,
?, u.Optional<T>> TooManyElementsException
is threw if there are more than one values are collected.partitioningBy
(Predicate<? super T> predicate) partitioningBy
(Predicate<? super T> predicate, Collector<? super T, A, D> downstream) static <T> Collector<T,
?, u.Optional<T>> reducing
(BinaryOperator<T> op) static <T,
R> Collector<T, ?, u.Optional<R>> reducing
(Function<? super T, ? extends R> mapper, BinaryOperator<R> op) static <T,
R> Collector<T, ?, R> reducing
(R identity, Function<? super T, ? extends R> mapper, BinaryOperator<R> op) static <T> Collector<T,
?, T> reducing
(T identity, BinaryOperator<T> op) static <T> Collector<T,
?, T> reducingOrElseGet
(BinaryOperator<T> op, Supplier<? extends T> supplierForEmpty) static <T,
R> Collector<T, ?, R> reducingOrElseGet
(Function<? super T, ? extends R> mapper, BinaryOperator<R> op, Supplier<? extends R> supplierForEmpty) static <T> Collector<T,
?, T> static <T> Collector<T,
?, T> reducingOrElseThrow
(BinaryOperator<T> op, Supplier<? extends RuntimeException> exceptionSupplier) static <T,
R> Collector<T, ?, R> reducingOrElseThrow
(Function<? super T, ? extends R> mapper, BinaryOperator<R> op) static <T,
R> Collector<T, ?, R> reducingOrElseThrow
(Function<? super T, ? extends R> mapper, BinaryOperator<R> op, Supplier<? extends RuntimeException> exceptionSupplier) static <T> Collector<T,
?, BigDecimalSummaryStatistics> summarizingBigDecimal
(Function<? super T, BigDecimal> mapper) static <T> Collector<T,
?, BigIntegerSummaryStatistics> summarizingBigInteger
(Function<? super T, BigInteger> mapper) static <T> Collector<T,
?, ByteSummaryStatistics> summarizingByte
(ToByteFunction<? super T> mapper) static <T> Collector<T,
?, CharSummaryStatistics> summarizingChar
(ToCharFunction<? super T> mapper) static <T> Collector<T,
?, DoubleSummaryStatistics> summarizingDouble
(ToDoubleFunction<? super T> mapper) static <T> Collector<T,
?, FloatSummaryStatistics> summarizingFloat
(ToFloatFunction<? 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,
?, ShortSummaryStatistics> summarizingShort
(ToShortFunction<? super T> mapper) static <T> Collector<T,
?, BigDecimal> summingBigDecimal
(Function<? super T, BigDecimal> mapper) static <T> Collector<T,
?, BigInteger> summingBigInteger
(Function<? super T, BigInteger> mapper) summingDouble
(ToDoubleFunction<? super T> mapper) summingInt
(ToIntFunction<? super T> mapper) summingIntToLong
(ToIntFunction<? super T> mapper) summingLong
(ToLongFunction<? super T> mapper) static <T,
R1, R2, R>
Collector<T,?, R> teeing
(Collector<? super T, ?, R1> downstream1, Collector<? super T, ?, R2> downstream2, BiFunction<? super R1, ? super R2, R> merger) toArray()
static <T,
A> Collector<T, ?, A[]> toArray
(IntFunction<A[]> arraySupplier) static <T,
A> Collector<T, ?, A[]> toBiMap
(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, BinaryOperator<V> mergeFunction) toBiMap
(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, BinaryOperator<V> mergeFunction, Supplier<BiMap<K, V>> mapFactory) toBiMap
(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, Supplier<BiMap<K, V>> mapFactory) static Collector<Boolean,
?, BooleanList> static <T,
C extends Collection<T>>
Collector<T,?, C> toCollection
(Supplier<? extends C> collectionFactory) static <T,
C extends Collection<T>>
Collector<T,?, C> toCollection
(Supplier<? extends C> collectionFactory, int atMostSize) static <T,
K, V> Collector<T, ?, ConcurrentMap<K, V>> toConcurrentMap
(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper) static <T,
K, V> Collector<T, ?, ConcurrentMap<K, V>> toConcurrentMap
(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, BinaryOperator<V> mergeFunction) static <T,
K, V, M extends ConcurrentMap<K, V>>
Collector<T,?, M> toConcurrentMap
(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, BinaryOperator<V> mergeFunction, Supplier<? extends M> mapFactory) static <T,
K, V, M extends ConcurrentMap<K, V>>
Collector<T,?, M> toConcurrentMap
(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, Supplier<? extends M> mapFactory) toDeque()
static Collector<Double,
?, DoubleList> static <T> Collector<T,
?, ImmutableList<T>> static <K,
V> Collector<Map.Entry<K, V>, ?, ImmutableMap<K, V>> static <K,
V> Collector<Map.Entry<K, V>, ?, ImmutableMap<K, V>> toImmutableMap
(BinaryOperator<V> mergeFunction) static <T,
K, V> Collector<T, ?, ImmutableMap<K, V>> toImmutableMap
(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper) static <T,
K, V> Collector<T, ?, ImmutableMap<K, V>> toImmutableMap
(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, BinaryOperator<V> mergeFunction) static <T> Collector<T,
?, ImmutableSet<T>> toLinkedHashMap
(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper) toLinkedHashMap
(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, BinaryOperator<V> mergeFunction) static <T> Collector<T,
?, LinkedList<T>> toList()
toList
(int atMostSize) static <T> Collector<T,
?, LongMultiset<T>> static <T> Collector<T,
?, LongMultiset<T>> toLongMultiset
(Supplier<LongMultiset<T>> supplier) toMap()
toMap
(BinaryOperator<V> mergeFunction) toMap
(BinaryOperator<V> mergeFunction, Supplier<? extends M> mapFactory) toMap
(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, BinaryOperator<V> mergeFunction) toMap
(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, BinaryOperator<V> mergeFunction, Supplier<? extends M> mapFactory) toMap
(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, Supplier<? extends M> mapFactory) static <K,
V> Collector<Map.Entry<K, V>, ?, ListMultimap<K, V>> static <T,
K> Collector<T, ?, ListMultimap<K, T>> toMultimap
(Function<? super T, ? extends K> keyMapper) static <T,
K, V> Collector<T, ?, ListMultimap<K, V>> toMultimap
(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper) static <T,
K, V, C extends Collection<V>, M extends Multimap<K, V, C>>
Collector<T,?, M> toMultimap
(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, Supplier<? extends M> mapFactory) static <T,
K, C extends Collection<T>, M extends Multimap<K, T, C>>
Collector<T,?, M> toMultimap
(Function<? super T, ? extends K> keyMapper, Supplier<? extends M> mapFactory) static <K,
V, C extends Collection<V>, M extends Multimap<K, V, C>>
Collector<Map.Entry<K,V>, ?, M> toMultimap
(Supplier<? extends M> mapFactory) toMultiset
(Supplier<Multiset<T>> supplier) toQueue()
toSet()
toSet
(int atMostSize)
-
Method Details
-
toCollection
public static <T,C extends Collection<T>> Collector<T,?, toCollectionC> (Supplier<? extends C> collectionFactory) - Type Parameters:
T
-C
-- Parameters:
collectionFactory
-- Returns:
-
toList
- Type Parameters:
T
-- Returns:
-
toLinkedList
- Type Parameters:
T
-- Returns:
-
toImmutableList
- Type Parameters:
T
-- Returns:
-
toSet
- Type Parameters:
T
-- Returns:
-
toLinkedHashSet
- Type Parameters:
T
-- Returns:
-
toImmutableSet
- Type Parameters:
T
-- Returns:
-
toQueue
- Type Parameters:
T
-- Returns:
-
toDeque
- Type Parameters:
T
-- Returns:
-
toCollection
public static <T,C extends Collection<T>> Collector<T,?, toCollectionC> (Supplier<? extends C> collectionFactory, int atMostSize) - Type Parameters:
T
-C
-- Parameters:
collectionFactory
-atMostSize
-- Returns:
-
toList
- Type Parameters:
T
-- Parameters:
atMostSize
-- Returns:
-
toSet
- Type Parameters:
T
-- Parameters:
atMostSize
-- Returns:
-
toMultiset
- Type Parameters:
T
-- Returns:
-
toMultiset
- Type Parameters:
T
-- Parameters:
supplier
-- Returns:
-
toLongMultiset
- Type Parameters:
T
-- Returns:
-
toLongMultiset
- Type Parameters:
T
-- Parameters:
supplier
-- Returns:
-
toArray
- Type Parameters:
T
-- Returns:
-
toArray
- Type Parameters:
T
-A
-- Parameters:
arraySupplier
-- Returns:
-
toArray
- Type Parameters:
T
-A
-- Parameters:
arraySupplier
-- Returns:
-
toBooleanList
- Returns:
-
toBooleanArray
- Returns:
-
toCharList
- Returns:
-
toCharArray
- Returns:
-
toByteList
- Returns:
-
toByteArray
- Returns:
-
toShortList
- Returns:
-
toShortArray
- Returns:
-
toIntList
- Returns:
-
toIntArray
- Returns:
-
toLongList
- Returns:
-
toLongArray
- Returns:
-
toFloatList
- Returns:
-
toFloatArray
- Returns:
-
toDoubleList
- Returns:
-
toDoubleArray
- Returns:
-
onlyOne
TooManyElementsException
is threw if there are more than one values are collected.- Type Parameters:
T
-- Returns:
-
onlyOne
TooManyElementsException
is threw if there are more than one values are collected.- Type Parameters:
T
-- Parameters:
predicate
-- Returns:
-
first
Only works for sequential Stream.- Type Parameters:
T
-- Returns:
- Throws:
UnsupportedOperationException
- operated by multiple threads
-
last
Only works for sequential Stream.- Type Parameters:
T
-- Returns:
- Throws:
UnsupportedOperationException
- operated by multiple threads
-
first
Only works for sequential Stream.- Type Parameters:
T
-- Parameters:
n
-- Returns:
- Throws:
UnsupportedOperationException
- operated by multiple threads
-
last
Only works for sequential Stream.- Type Parameters:
T
-- Parameters:
n
-- Returns:
- Throws:
UnsupportedOperationException
- operated by multiple threads
-
joining
- Returns:
-
joining
- Parameters:
delimiter
-- Returns:
-
joining
public static Collector<CharSequence,?, joiningString> (CharSequence delimiter, CharSequence prefix, CharSequence suffix) - Parameters:
delimiter
-prefix
-suffix
-- Returns:
-
filtering
It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.
Returns aCollector
which filters input elements by the supplied predicate, collecting them to the list.This method behaves like
filtering(predicate, Collectors.toList())
.There are no guarantees on the type, mutability, serializability, or thread-safety of the
List
returned.- Type Parameters:
T
- the type of the input elements- Parameters:
predicate
- a filter function to be applied to the input elements- Returns:
- a collector which applies the predicate to the input elements and
collects the elements for which predicate returned true to the
List
- Since:
- 0.6.0
- See Also:
-
filtering
public static <T,A, Collector<T,R> ?, filteringR> (Predicate<? super T> predicate, Collector<? super T, A, R> downstream) It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.
Returns aCollector
which passes only those elements to the specified downstream collector which match given predicate.This method returns a short-circuiting collector if downstream collector is short-circuiting.
The operation performed by the returned collector is equivalent to
stream.filter(predicate).collect(downstream)
. This collector is mostly useful as a downstream collector in cascaded operation involving#pairing(Collector, Collector, BiFunction)
collector.This method is similar to
Collectors.filtering
method which appears in JDK 9. However when downstream collector is short-circuiting , this method will also return a short-circuiting collector.- Type Parameters:
T
- the type of the input elementsA
- intermediate accumulation type of the downstream collectorR
- result type of collector- Parameters:
predicate
- a filter function to be applied to the input elementsdownstream
- a collector which will accept filtered values- Returns:
- a collector which applies the predicate to the input elements and provides the elements for which predicate returned true to the downstream collector
- Since:
- 0.4.0
- See Also:
-
#pairing(Collector, Collector, BiFunction)
-
mapping
- Type Parameters:
T
-U
-- Parameters:
mapper
-- Returns:
-
mapping
public static <T,U, Collector<T,A, R> ?, mappingR> (Function<? super T, ? extends U> mapper, Collector<? super U, A, R> downstream) - Type Parameters:
T
-U
-A
-R
-- Parameters:
mapper
-downstream
-- Returns:
-
flatMaping
@Beta public static <T,U> Collector<T,?, flatMapingList<U>> (Function<? super T, ? extends Stream<? extends U>> mapper) - Type Parameters:
T
-U
-- Parameters:
mapper
-- Returns:
-
flatMaping
public static <T,U, Collector<T,A, R> ?, flatMapingR> (Function<? super T, ? extends Stream<? extends U>> mapper, Collector<? super U, A, R> downstream) - Type Parameters:
T
-U
-A
-R
-- Parameters:
mapper
-downstream
-- Returns:
-
flattMaping
@Beta public static <T,U> Collector<T,?, flattMapingList<U>> (Function<? super T, ? extends Stream<? extends U>> mapper) - Type Parameters:
T
-U
-- Parameters:
mapper
-- Returns:
-
flattMaping
public static <T,U, Collector<T,A, R> ?, flattMapingR> (Function<? super T, ? extends Stream<? extends U>> mapper, Collector<? super U, A, R> downstream) - Type Parameters:
T
-U
-A
-R
-- Parameters:
mapper
-downstream
-- Returns:
-
flatmapping
@Beta public static <T,U> Collector<T,?, flatmappingList<U>> (Function<? super T, ? extends Collection<? extends U>> mapper) - Type Parameters:
T
-U
-- Parameters:
mapper
-- Returns:
-
flatmapping
public static <T,U, Collector<T,A, R> ?, flatmappingR> (Function<? super T, ? extends Collection<? extends U>> mapper, Collector<? super U, A, R> downstream) - Type Parameters:
T
-U
-A
-R
-- Parameters:
mapper
-downstream
-- Returns:
-
flatMaping
@Beta public static <T,T2, Collector<T,U> ?, flatMapingList<U>> (Function<? super T, ? extends Stream<? extends T2>> flatMapper, BiFunction<? super T, ? super T2, ? extends U> mapper) - Type Parameters:
T
-T2
-U
-- Parameters:
flatMapper
-mapper
-- Returns:
-
flatMaping
@Beta public static <T,T2, Collector<T,U, A, R> ?, flatMapingR> (Function<? super T, ? extends Stream<? extends T2>> flatMapper, BiFunction<? super T, ? super T2, ? extends U> mapper, Collector<? super U, A, R> downstream) - Type Parameters:
T
-T2
-U
-A
-R
-- Parameters:
flatMapper
-mapper
-downstream
-- Returns:
-
flattMaping
@Beta public static <T,T2, Collector<T,U> ?, flattMapingList<U>> (Function<? super T, ? extends Stream<? extends T2>> flatMapper, BiFunction<? super T, ? super T2, ? extends U> mapper) - Type Parameters:
T
-T2
-U
-- Parameters:
flatMapper
-mapper
-- Returns:
-
flattMaping
@Beta public static <T,T2, Collector<T,U, A, R> ?, flattMapingR> (Function<? super T, ? extends Stream<? extends T2>> flatMapper, BiFunction<? super T, ? super T2, ? extends U> mapper, Collector<? super U, A, R> downstream) - Type Parameters:
T
-T2
-U
-A
-R
-- Parameters:
flatMapper
-mapper
-downstream
-- Returns:
-
flatmapping
@Beta public static <T,T2, Collector<T,U> ?, flatmappingList<U>> (Function<? super T, ? extends Collection<? extends T2>> flatMapper, BiFunction<? super T, ? super T2, ? extends U> mapper) - Type Parameters:
T
-T2
-U
-- Parameters:
flatMapper
-mapper
-- Returns:
-
flatmapping
@Beta public static <T,T2, Collector<T,U, A, R> ?, flatmappingR> (Function<? super T, ? extends Collection<? extends T2>> flatMapper, BiFunction<? super T, ? super T2, ? extends U> mapper, Collector<? super U, A, R> downstream) - Type Parameters:
T
-T2
-U
-A
-R
-- Parameters:
flatMapper
-mapper
-downstream
-- Returns:
-
collectingAndThen
public static <T,A, Collector<T,R, RR> A, collectingAndThenRR> (Collector<T, A, R> downstream, Function<R, RR> finisher) - Type Parameters:
T
-A
-R
-RR
-- Parameters:
downstream
-finisher
-- Returns:
-
collectingOrEmpty
@Beta public static <T,A, Collector<T,R> A, collectingOrEmptyu.Optional<R>> (Collector<T, A, R> collector) - Type Parameters:
T
-A
-R
-- Parameters:
collector
-- Returns:
-
collectingOrElseIfEmpty
@Beta public static <T,A, Collector<T,R> A, collectingOrElseIfEmptyR> (Collector<T, A, R> collector, R defaultForEmpty) - Type Parameters:
T
-A
-R
-- Parameters:
collector
-defaultForEmpty
-- Returns:
-
collectingOrElseGetIfEmpty
@Beta public static <T,A, Collector<T,R> A, collectingOrElseGetIfEmptyR> (Collector<T, A, R> collector, Supplier<? extends R> defaultForEmpty) - Type Parameters:
T
-A
-R
-- Parameters:
collector
-defaultForEmpty
-- Returns:
-
collectingOrElseThrowIfEmpty
@Beta public static <T,A, Collector<T,R> A, collectingOrElseThrowIfEmptyR> (Collector<T, A, R> collector) - Type Parameters:
T
-A
-R
-- Parameters:
collector
-- Returns:
-
collectingOrElseThrowIfEmpty
@Beta public static <T,A, Collector<T,R> A, collectingOrElseThrowIfEmptyR> (Collector<T, A, R> collector, Supplier<? extends RuntimeException> exceptionSupplier) - Type Parameters:
T
-A
-R
-- Parameters:
collector
-exceptionSupplier
-- Returns:
-
distinctBy
It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.
Returns aCollector
which collects into theList
the input elements for which given mapper function returns distinct results.For ordered source the order of collected elements is preserved. If the same result is returned by mapper function for several elements, only the first element is included into the resulting list.
There are no guarantees on the type, mutability, serializability, or thread-safety of the
List
returned.The operation performed by the returned collector is equivalent to
stream.distinct(mapper).toList()
, but may work faster.- Type Parameters:
T
- the type of the input elements- Parameters:
keyExtractor
- a function which classifies input elements.- Returns:
- a collector which collects distinct elements to the
List
. - Since:
- 0.3.8
-
distinctBy
public static <T,C extends Collection<T>> Collector<T,?, distinctByC> (Function<? super T, ?> keyExtractor, Supplier<? extends C> suppplier) - Type Parameters:
T
-C
-- Parameters:
keyExtractor
-suppplier
-- Returns:
-
distinctCount
It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.
Returns aCollector
which counts a number of distinct values the mapper function returns for the stream elements.The operation performed by the returned collector is equivalent to
stream.map(mapper).distinct().count()
. This collector is mostly useful as a downstream collector.- Type Parameters:
T
- the type of the input elements- Parameters:
keyExtractor
- a function which classifies input elements.- Returns:
- a collector which counts a number of distinct classes the mapper function returns for the stream elements.
-
counting
- Type Parameters:
T
-- Returns:
-
countingToInt
- Type Parameters:
T
-- Returns:
-
min
- Type Parameters:
T
-- Returns:
-
min
- Type Parameters:
T
-- Parameters:
comparator
-- Returns:
-
minOrElse
- Type Parameters:
T
-- Parameters:
defaultForEmpty
-- Returns:
-
minOrElse
- Type Parameters:
T
-- Parameters:
comparator
-defaultForEmpty
-- Returns:
-
minOrElseGet
public static <T extends Comparable<? super T>> Collector<T,?, minOrElseGetT> (Supplier<? extends T> supplierForEmpty) - Type Parameters:
T
-- Parameters:
supplierForEmpty
-- Returns:
-
minOrElseGet
public static <T> Collector<T,?, minOrElseGetT> (Comparator<? super T> comparator, Supplier<? extends T> supplierForEmpty) - Type Parameters:
T
-- Parameters:
comparator
-supplierForEmpty
-- Returns:
-
minOrElseThrow
- Type Parameters:
T
-- Returns:
-
minOrElseThrow
- Type Parameters:
T
-- Parameters:
comparator
-- Returns:
-
minOrElseThrow
public static <T> Collector<T,?, minOrElseThrowT> (Comparator<? super T> comparator, Supplier<? extends RuntimeException> exceptionSupplier) - Type Parameters:
T
-- Parameters:
comparator
-exceptionSupplier
-- Returns:
-
minBy
public static <T> Collector<T,?, minByu.Optional<T>> (Function<? super T, ? extends Comparable> keyMapper) - Type Parameters:
T
-- Parameters:
keyMapper
-- Returns:
-
minByOrElseGet
public static <T> Collector<T,?, minByOrElseGetT> (Function<? super T, ? extends Comparable> keyMapper, Supplier<? extends T> supplierForEmpty) - Type Parameters:
T
-- Parameters:
keyMapper
-supplierForEmpty
-- Returns:
-
minByOrElseThrow
public static <T> Collector<T,?, minByOrElseThrowT> (Function<? super T, ? extends Comparable> keyMapper) - Type Parameters:
T
-- Parameters:
keyMapper
-- Returns:
-
minByOrElseThrow
public static <T> Collector<T,?, minByOrElseThrowT> (Function<? super T, ? extends Comparable> keyMapper, Supplier<? extends RuntimeException> exceptionSupplier) - Type Parameters:
T
-- Parameters:
keyMapper
-exceptionSupplier
-- Returns:
-
max
- Type Parameters:
T
-- Returns:
-
max
- Type Parameters:
T
-- Parameters:
comparator
-- Returns:
-
maxOrElse
- Type Parameters:
T
-- Parameters:
defaultForEmpty
-- Returns:
-
maxOrElse
- Type Parameters:
T
-- Parameters:
comparator
-defaultForEmpty
-- Returns:
-
maxOrElseGet
public static <T extends Comparable<? super T>> Collector<T,?, maxOrElseGetT> (Supplier<? extends T> supplierForEmpty) - Type Parameters:
T
-- Parameters:
supplierForEmpty
-- Returns:
-
maxOrElseGet
public static <T> Collector<T,?, maxOrElseGetT> (Comparator<? super T> comparator, Supplier<? extends T> supplierForEmpty) - Type Parameters:
T
-- Parameters:
comparator
-supplierForEmpty
-- Returns:
-
maxOrElseThrow
- Type Parameters:
T
-- Returns:
-
maxOrElseThrow
- Type Parameters:
T
-- Parameters:
comparator
-- Returns:
-
maxOrElseThrow
public static <T> Collector<T,?, maxOrElseThrowT> (Comparator<? super T> comparator, Supplier<? extends RuntimeException> exceptionSupplier) - Type Parameters:
T
-- Parameters:
comparator
-exceptionSupplier
-- Returns:
-
maxBy
public static <T> Collector<T,?, maxByu.Optional<T>> (Function<? super T, ? extends Comparable> keyMapper) - Type Parameters:
T
-- Parameters:
keyMapper
-- Returns:
-
maxByOrElseGet
public static <T> Collector<T,?, maxByOrElseGetT> (Function<? super T, ? extends Comparable> keyMapper, Supplier<? extends T> supplierForEmpty) - Type Parameters:
T
-- Parameters:
keyMapper
-supplierForEmpty
-- Returns:
-
maxByOrElseThrow
public static <T> Collector<T,?, maxByOrElseThrowT> (Function<? super T, ? extends Comparable> keyMapper) - Type Parameters:
T
-- Parameters:
keyMapper
-- Returns:
-
maxByOrElseThrow
public static <T> Collector<T,?, maxByOrElseThrowT> (Function<? super T, ? extends Comparable> keyMapper, Supplier<? extends RuntimeException> exceptionSupplier) - Type Parameters:
T
-- Parameters:
keyMapper
-exceptionSupplier
-- Returns:
-
minAll
It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.
Returns aCollector
which finds all the elements which are equal to each other and smaller than any other element according to the natural order. The found elements are collected toList
.- Type Parameters:
T
- the type of the input elements- Returns:
- a
Collector
which finds all the minimal elements and collects them to theList
. - See Also:
-
minAll
It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.
Returns aCollector
which finds all the elements which are equal to each other and smaller than any other element according to the specifiedComparator
. The found elements are collected toList
.- Type Parameters:
T
- the type of the input elements- Parameters:
comparator
- aComparator
to compare the elements- Returns:
- a
Collector
which finds all the minimal elements and collects them to theList
. - See Also:
-
minAll
- Type Parameters:
T
-- Parameters:
comparator
-atMostSize
-- Returns:
-
minAll
It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.
Returns aCollector
which finds all the elements which are equal to each other and smaller than any other element according to the natural order. The found elements are reduced using the specified downstreamCollector
.- Type Parameters:
T
- the type of the input elementsA
- the intermediate accumulation type of the downstream collectorR
- the result type of the downstream reduction- Parameters:
downstream
- aCollector
implementing the downstream reduction- Returns:
- a
Collector
which finds all the minimal elements. - See Also:
-
minAll
public static <T,A, Collector<T,R> ?, minAllR> (Comparator<? super T> comparator, Collector<T, A, R> downstream) It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.
Returns aCollector
which finds all the elements which are equal to each other and smaller than any other element according to the specifiedComparator
. The found elements are reduced using the specified downstreamCollector
.- Type Parameters:
T
- the type of the input elementsA
- the intermediate accumulation type of the downstream collectorR
- the result type of the downstream reduction- Parameters:
comparator
- aComparator
to compare the elementsdownstream
- aCollector
implementing the downstream reduction- Returns:
- a
Collector
which finds all the minimal elements. - See Also:
-
minAlll
public static <T extends Comparable,R> Collector<T,?, minAlllu.Optional<Pair<T, R>>> (Collector<T, ?, R> downstream) - Type Parameters:
T
-R
-- Parameters:
downstream
-- Returns:
-
minAlll
public static <T,R> Collector<T,?, minAlllu.Optional<Pair<T, R>>> (Comparator<? super T> comparator, Collector<? super T, ?, R> downstream) - Type Parameters:
T
-R
-- Parameters:
comparator
-downstream
-- Returns:
-
minAlll
public static <T,R, Collector<T,RR> ?, minAlllRR> (Comparator<? super T> comparator, Collector<? super T, ?, R> downstream, Function<u.Optional<Pair<T, R>>, RR> finisher) - Type Parameters:
T
-R
-RR
-- Parameters:
comparator
-downstream
-finisher
-- Returns:
-
maxAll
It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.
Returns aCollector
which finds all the elements which are equal to each other and bigger than any other element according to the natural order. The found elements are collected toList
.- Type Parameters:
T
- the type of the input elements- Returns:
- a
Collector
which finds all the maximal elements and collects them to theList
. - See Also:
-
maxAll
It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.
Returns aCollector
which finds all the elements which are equal to each other and bigger than any other element according to the specifiedComparator
. The found elements are collected toList
.- Type Parameters:
T
- the type of the input elements- Parameters:
comparator
- aComparator
to compare the elements- Returns:
- a
Collector
which finds all the maximal elements and collects them to theList
. - See Also:
-
maxAll
- Type Parameters:
T
-- Parameters:
comparator
-atMostSize
-- Returns:
-
maxAll
It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.
Returns aCollector
which finds all the elements which are equal to each other and bigger than any other element according to the natural order. The found elements are reduced using the specified downstreamCollector
.- Type Parameters:
T
- the type of the input elementsA
- the intermediate accumulation type of the downstream collectorR
- the result type of the downstream reduction- Parameters:
downstream
- aCollector
implementing the downstream reduction- Returns:
- a
Collector
which finds all the maximal elements. - See Also:
-
maxAll
public static <T,R> Collector<T,?, maxAllR> (Comparator<? super T> comparator, Collector<? super T, ?, R> downstream) It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.
Returns aCollector
which finds all the elements which are equal to each other and bigger than any other element according to the specifiedComparator
. The found elements are reduced using the specified downstreamCollector
.- Type Parameters:
T
- the type of the input elementsA
- the intermediate accumulation type of the downstream collectorR
- the result type of the downstream reduction- Parameters:
comparator
- aComparator
to compare the elementsdownstream
- aCollector
implementing the downstream reduction- Returns:
- a
Collector
which finds all the maximal elements. - See Also:
-
maxAlll
public static <T extends Comparable,R> Collector<T,?, maxAlllu.Optional<Pair<T, R>>> (Collector<T, ?, R> downstream) - Type Parameters:
T
-R
-- Parameters:
downstream
-- Returns:
-
maxAlll
public static <T,R> Collector<T,?, maxAlllu.Optional<Pair<T, R>>> (Comparator<? super T> comparator, Collector<? super T, ?, R> downstream) - Type Parameters:
T
-R
-- Parameters:
comparator
-downstream
-- Returns:
-
maxAlll
public static <T,R, Collector<T,RR> ?, maxAlllRR> (Comparator<? super T> comparator, Collector<? super T, ?, R> downstream, Function<u.Optional<Pair<T, R>>, RR> finisher) - Type Parameters:
T
-R
-RR
-- Parameters:
comparator
-downstream
-finisher
-- Returns:
-
minMax
- Type Parameters:
T
-- Returns:
-
minMax
- Type Parameters:
T
-- Parameters:
comparator
-- Returns:
- See Also:
-
minMax
public static <T,R> Collector<T,?, minMaxu.Optional<R>> (Comparator<? super T> comparator, BiFunction<? super T, ? super T, ? extends R> finisher) It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.
Returns aCollector
which finds the minimal and maximal element according to the supplied comparator, then applies finisher function to them producing the final result.This collector produces stable result for ordered stream: if several minimal or maximal elements appear, the collector always selects the first encountered.
If there are no input elements, the finisher method is not called and empty
Optional
is returned. Otherwise the finisher result is wrapped intoOptional
.- Type Parameters:
T
- the type of the input elementsR
- the type of the result wrapped intoOptional
- Parameters:
comparator
- comparator which is used to find minimal and maximal elementfinisher
- aBiFunction
which takes minimal and maximal element and produces the final result.- Returns:
- a
Collector
which finds minimal and maximal elements.
-
minMaxBy
public static <T> Collector<T,?, minMaxByu.Optional<Pair<T, T>>> (Function<? super T, ? extends Comparable> keyMapper) - Type Parameters:
T
-- Parameters:
keyMapper
-- Returns:
-
minMaxBy
public static <T,R> Collector<T,?, minMaxByu.Optional<R>> (Function<? super T, ? extends Comparable> keyMapper, BiFunction<? super T, ? super T, ? extends R> finisher) - Type Parameters:
T
-R
-- Parameters:
keyMapper
-finisher
-- Returns:
-
minMaxOrElseGet
public static <T extends Comparable<? super T>> Collector<T,?, minMaxOrElseGetPair<T, T>> (Supplier<Pair<? extends T, ? extends T>> supplierForEmpty) - Type Parameters:
T
-- Parameters:
supplierForEmpty
-- Returns:
-
minMaxOrElseGet
public static <T> Collector<T,?, minMaxOrElseGetPair<T, T>> (Comparator<? super T> comparator, Supplier<Pair<? extends T, ? extends T>> supplierForEmpty) - Type Parameters:
T
-- Parameters:
comparator
-supplierForEmpty
-- Returns:
-
minMaxOrElseThrow
- Type Parameters:
T
-- Returns:
-
minMaxOrElseThrow
- Type Parameters:
T
-- Parameters:
comparator
-- Returns:
-
summingInt
- Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
summingIntToLong
- Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
summingLong
- Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
summingDouble
- Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
summingBigInteger
public static <T> Collector<T,?, summingBigIntegerBigInteger> (Function<? super T, BigInteger> mapper) - Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
summingBigDecimal
public static <T> Collector<T,?, summingBigDecimalBigDecimal> (Function<? super T, BigDecimal> mapper) - Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
averagingInt
- Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
averagingIntOrElseThrow
- Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
averagingLong
- Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
averagingLongOrElseThrow
- Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
averagingDouble
public static <T> Collector<T,?, averagingDoubleu.OptionalDouble> (ToDoubleFunction<? super T> mapper) - Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
averagingDoubleOrElseThrow
public static <T> Collector<T,?, averagingDoubleOrElseThrowDouble> (ToDoubleFunction<? super T> mapper) - Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
averagingBigInteger
public static <T> Collector<T,?, averagingBigIntegeru.Optional<BigDecimal>> (Function<? super T, BigInteger> mapper) - Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
averagingBigIntegerOrElseThrow
public static <T> Collector<T,?, averagingBigIntegerOrElseThrowBigDecimal> (Function<? super T, BigInteger> mapper) - Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
averagingBigDecimal
public static <T> Collector<T,?, averagingBigDecimalu.Optional<BigDecimal>> (Function<? super T, BigDecimal> mapper) - Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
averagingBigDecimalOrElseThrow
public static <T> Collector<T,?, averagingBigDecimalOrElseThrowBigDecimal> (Function<? super T, BigDecimal> mapper) - Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
summarizingChar
public static <T> Collector<T,?, summarizingCharCharSummaryStatistics> (ToCharFunction<? super T> mapper) - Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
summarizingByte
public static <T> Collector<T,?, summarizingByteByteSummaryStatistics> (ToByteFunction<? super T> mapper) - Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
summarizingShort
public static <T> Collector<T,?, summarizingShortShortSummaryStatistics> (ToShortFunction<? super T> mapper) - Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
summarizingInt
public static <T> Collector<T,?, summarizingIntIntSummaryStatistics> (ToIntFunction<? super T> mapper) - Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
summarizingLong
public static <T> Collector<T,?, summarizingLongLongSummaryStatistics> (ToLongFunction<? super T> mapper) - Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
summarizingFloat
public static <T> Collector<T,?, summarizingFloatFloatSummaryStatistics> (ToFloatFunction<? super T> mapper) - Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
summarizingDouble
public static <T> Collector<T,?, summarizingDoubleDoubleSummaryStatistics> (ToDoubleFunction<? super T> mapper) - Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
summarizingBigInteger
public static <T> Collector<T,?, summarizingBigIntegerBigIntegerSummaryStatistics> (Function<? super T, BigInteger> mapper) - Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
summarizingBigDecimal
public static <T> Collector<T,?, summarizingBigDecimalBigDecimalSummaryStatistics> (Function<? super T, BigDecimal> mapper) - Type Parameters:
T
-- Parameters:
mapper
-- Returns:
-
reducing
- Type Parameters:
T
-- Parameters:
identity
-op
-- Returns:
-
reducing
- Type Parameters:
T
-- Parameters:
op
-- Returns:
-
reducingOrElseGet
public static <T> Collector<T,?, reducingOrElseGetT> (BinaryOperator<T> op, Supplier<? extends T> supplierForEmpty) - Type Parameters:
T
-- Parameters:
op
-supplierForEmpty
-- Returns:
-
reducingOrElseThrow
- Type Parameters:
T
-- Parameters:
op
-- Returns:
-
reducingOrElseThrow
public static <T> Collector<T,?, reducingOrElseThrowT> (BinaryOperator<T> op, Supplier<? extends RuntimeException> exceptionSupplier) - Type Parameters:
T
-- Parameters:
op
-exceptionSupplier
-- Returns:
-
reducing
public static <T,R> Collector<T,?, reducingR> (R identity, Function<? super T, ? extends R> mapper, BinaryOperator<R> op) - Type Parameters:
T
-R
-- Parameters:
identity
-mapper
-op
-- Returns:
-
reducing
public static <T,R> Collector<T,?, reducingu.Optional<R>> (Function<? super T, ? extends R> mapper, BinaryOperator<R> op) - Type Parameters:
T
-R
-- Parameters:
mapper
-op
-- Returns:
-
reducingOrElseGet
public static <T,R> Collector<T,?, reducingOrElseGetR> (Function<? super T, ? extends R> mapper, BinaryOperator<R> op, Supplier<? extends R> supplierForEmpty) - Type Parameters:
T
-R
-- Parameters:
mapper
-op
-supplierForEmpty
-- Returns:
-
reducingOrElseThrow
public static <T,R> Collector<T,?, reducingOrElseThrowR> (Function<? super T, ? extends R> mapper, BinaryOperator<R> op, Supplier<? extends RuntimeException> exceptionSupplier) - Type Parameters:
T
-R
-- Parameters:
mapper
-op
-exceptionSupplier
-- Returns:
-
reducingOrElseThrow
public static <T,R> Collector<T,?, reducingOrElseThrowR> (Function<? super T, ? extends R> mapper, BinaryOperator<R> op) - Type Parameters:
T
-R
-- Parameters:
mapper
-op
-- Returns:
-
commonPrefix
It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.
Returns aCollector
which computes a common prefix of inputCharSequence
objects returning the result asString
. For empty input the emptyString
is returned.The returned
Collector
handles specially Unicode surrogate pairs: the returned prefix may end with Unicode high-surrogate code unit only if it's not succeeded by Unicode low-surrogate code unit in any of the input sequences. Normally the ending high-surrogate code unit is removed from the prefix.This method returns a short-circuiting collector: it may not process all the elements if the common prefix is empty.
- Returns:
- a
Collector
which computes a common prefix. - Since:
- 0.5.0
-
commonSuffix
It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.
Returns aCollector
which computes a common suffix of inputCharSequence
objects returning the result asString
. For empty input the emptyString
is returned.The returned
Collector
handles specially Unicode surrogate pairs: the returned suffix may start with Unicode low-surrogate code unit only if it's not preceded by Unicode high-surrogate code unit in any of the input sequences. Normally the starting low-surrogate code unit is removed from the suffix.This method returns a short-circuiting collector: it may not process all the elements if the common suffix is empty.
- Returns:
- a
Collector
which computes a common suffix. - Since:
- 0.5.0
-
groupingBy
public static <T,K> Collector<T,?, groupingByMap<K, List<T>>> (Function<? super T, ? extends K> keyMapper) - Type Parameters:
T
-K
-- Parameters:
keyMapper
-- Returns:
-
groupingBy
public static <T,K, Collector<T,M extends Map<K, List<T>>> ?, groupingByM> (Function<? super T, ? extends K> keyMapper, Supplier<? extends M> mapFactory) - Type Parameters:
T
-K
-M
-- Parameters:
keyMapper
-mapFactory
-- Returns:
-
groupingBy
public static <T,K, Collector<T,A, D> ?, groupingByMap<K, D>> (Function<? super T, ? extends K> keyMapper, Collector<? super T, A, D> downstream) - Type Parameters:
T
-K
-A
-D
-- Parameters:
keyMapper
-downstream
-- Returns:
-
groupingBy
public static <T,K, Collector<T,A, D, M extends Map<K, D>> ?, groupingByM> (Function<? super T, ? extends K> keyMapper, Collector<? super T, A, D> downstream, Supplier<? extends M> mapFactory) - Type Parameters:
T
-K
-A
-D
-M
-- Parameters:
keyMapper
-downstream
-mapFactory
-- Returns:
-
groupingByConcurrent
public static <T,K> Collector<T,?, groupingByConcurrentConcurrentMap<K, List<T>>> (Function<? super T, ? extends K> keyMapper) - Type Parameters:
T
-K
-- Parameters:
keyMapper
-- Returns:
-
groupingByConcurrent
public static <T,K, Collector<T,M extends ConcurrentMap<K, List<T>>> ?, groupingByConcurrentM> (Function<? super T, ? extends K> keyMapper, Supplier<? extends M> mapFactory) - Type Parameters:
T
-K
-M
-- Parameters:
keyMapper
-mapFactory
-- Returns:
-
groupingByConcurrent
public static <T,K, Collector<T,A, D> ?, groupingByConcurrentConcurrentMap<K, D>> (Function<? super T, ? extends K> keyMapper, Collector<? super T, A, D> downstream) - Type Parameters:
T
-K
-A
-D
-- Parameters:
keyMapper
-downstream
-- Returns:
-
groupingByConcurrent
public static <T,K, Collector<T,A, D, M extends ConcurrentMap<K, D>> ?, groupingByConcurrentM> (Function<? super T, ? extends K> keyMapper, Collector<? super T, A, D> downstream, Supplier<? extends M> mapFactory) - Type Parameters:
T
-K
-A
-D
-M
-- Parameters:
keyMapper
-downstream
-mapFactory
-- Returns:
-
partitioningBy
public static <T> Collector<T,?, partitioningByMap<Boolean, List<T>>> (Predicate<? super T> predicate) - Type Parameters:
T
-- Parameters:
predicate
-- Returns:
-
partitioningBy
public static <T,D, Collector<T,A> ?, partitioningByMap<Boolean, D>> (Predicate<? super T> predicate, Collector<? super T, A, D> downstream) - Type Parameters:
T
-D
-A
-- Parameters:
predicate
-downstream
-- Returns:
-
countingBy
public static <T,K> Collector<T,?, countingByMap<K, Long>> (Function<? super T, ? extends K> keyMapper) - Type Parameters:
T
-K
-- Parameters:
keyMapper
-- Returns:
-
countingBy
public static <T,K, Collector<T,M extends Map<K, Long>> ?, countingByM> (Function<? super T, ? extends K> keyMapper, Supplier<? extends M> mapFactory) - Type Parameters:
T
-K
-M
-- Parameters:
keyMapper
-mapFactory
-- Returns:
-
countingToIntBy
public static <T,K> Collector<T,?, countingToIntByMap<K, Integer>> (Function<? super T, ? extends K> keyMapper) - Type Parameters:
T
-K
-- Parameters:
keyMapper
-- Returns:
-
countingToIntBy
public static <T,K, Collector<T,M extends Map<K, Integer>> ?, countingToIntByM> (Function<? super T, ? extends K> keyMapper, Supplier<? extends M> mapFactory) - Type Parameters:
T
-K
-M
-- Parameters:
keyMapper
-mapFactory
-- Returns:
-
toMap
- Type Parameters:
K
-V
-- Returns:
-
toMap
- Type Parameters:
K
-V
-- Parameters:
mergeFunction
-- Returns:
-
toMap
public static <K,V, Collector<Map.Entry<K,M extends Map<K, V>> V>, toMap?, M> (Supplier<? extends M> mapFactory) - Type Parameters:
K
-V
-M
-- Parameters:
mapFactory
-- Returns:
-
toMap
public static <K,V, Collector<Map.Entry<K,M extends Map<K, V>> V>, toMap?, M> (BinaryOperator<V> mergeFunction, Supplier<? extends M> mapFactory) - Type Parameters:
K
-V
-M
-- Parameters:
mergeFunction
-mapFactory
-- Returns:
-
toMap
public static <T,K, Collector<T,V> ?, toMapMap<K, V>> (Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper) - Type Parameters:
T
-K
-V
-- Parameters:
keyMapper
-valueMapper
-- Returns:
-
toMap
public static <T,K, Collector<T,V> ?, toMapMap<K, V>> (Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, BinaryOperator<V> mergeFunction) - Type Parameters:
T
-K
-V
-- Parameters:
keyMapper
-valueMapper
-mergeFunction
-- Returns:
-
toMap
public static <T,K, Collector<T,V, M extends Map<K, V>> ?, toMapM> (Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, Supplier<? extends M> mapFactory) - Type Parameters:
T
-K
-V
-M
-- Parameters:
keyMapper
-valueMapper
-mapFactory
-- Returns:
-
toMap
public static <T,K, Collector<T,V, M extends Map<K, V>> ?, toMapM> (Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, BinaryOperator<V> mergeFunction, Supplier<? extends M> mapFactory) - Type Parameters:
T
-K
-V
-M
-- Parameters:
keyMapper
-valueMapper
-mergeFunction
-mapFactory
-- Returns:
-
toImmutableMap
- Type Parameters:
K
-V
-- Returns:
-
toImmutableMap
public static <K,V> Collector<Map.Entry<K,V>, toImmutableMap?, ImmutableMap<K, V>> (BinaryOperator<V> mergeFunction) - Type Parameters:
K
-V
-- Parameters:
mergeFunction
-- Returns:
-
toImmutableMap
public static <T,K, Collector<T,V> ?, toImmutableMapImmutableMap<K, V>> (Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper) - Type Parameters:
T
-K
-V
-- Parameters:
keyMapper
-valueMapper
-- Returns:
-
toImmutableMap
public static <T,K, Collector<T,V> ?, toImmutableMapImmutableMap<K, V>> (Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, BinaryOperator<V> mergeFunction) - Type Parameters:
T
-K
-V
-- Parameters:
keyMapper
-valueMapper
-mergeFunction
-- Returns:
-
toLinkedHashMap
public static <T,K, Collector<T,V> ?, toLinkedHashMapMap<K, V>> (Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper) - Type Parameters:
T
-K
-V
-- Parameters:
keyMapper
-valueMapper
-- Returns:
- See Also:
-
toLinkedHashMap
public static <T,K, Collector<T,V> ?, toLinkedHashMapMap<K, V>> (Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, BinaryOperator<V> mergeFunction) - Type Parameters:
T
-K
-V
-- Parameters:
keyMapper
-valueMapper
-mergeFunction
-- Returns:
- See Also:
-
toConcurrentMap
public static <T,K, Collector<T,V> ?, toConcurrentMapConcurrentMap<K, V>> (Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper) - Type Parameters:
T
-K
-V
-- Parameters:
keyMapper
-valueMapper
-- Returns:
-
toConcurrentMap
public static <T,K, Collector<T,V, M extends ConcurrentMap<K, V>> ?, toConcurrentMapM> (Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, Supplier<? extends M> mapFactory) - Type Parameters:
T
-K
-V
-M
-- Parameters:
keyMapper
-valueMapper
-mapFactory
-- Returns:
-
toConcurrentMap
public static <T,K, Collector<T,V> ?, toConcurrentMapConcurrentMap<K, V>> (Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, BinaryOperator<V> mergeFunction) - Type Parameters:
T
-K
-V
-- Parameters:
keyMapper
-valueMapper
-mergeFunction
-- Returns:
-
toConcurrentMap
public static <T,K, Collector<T,V, M extends ConcurrentMap<K, V>> ?, toConcurrentMapM> (Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, BinaryOperator<V> mergeFunction, Supplier<? extends M> mapFactory) - Type Parameters:
T
-K
-V
-M
-- Parameters:
keyMapper
-valueMapper
-mergeFunction
-mapFactory
-- Returns:
-
toBiMap
public static <T,K, Collector<T,V> ?, toBiMapBiMap<K, V>> (Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper) - Type Parameters:
T
-K
-V
-- Parameters:
keyMapper
-valueMapper
-- Returns:
-
toBiMap
public static <T,K, Collector<T,V> ?, toBiMapBiMap<K, V>> (Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, Supplier<BiMap<K, V>> mapFactory) - Type Parameters:
T
-K
-V
-- Parameters:
keyMapper
-valueMapper
-mapFactory
-- Returns:
-
toBiMap
public static <T,K, Collector<T,V> ?, toBiMapBiMap<K, V>> (Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, BinaryOperator<V> mergeFunction) - Type Parameters:
T
-K
-V
-- Parameters:
keyMapper
-valueMapper
-mergeFunction
-- Returns:
-
toBiMap
public static <T,K, Collector<T,V> ?, toBiMapBiMap<K, V>> (Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, BinaryOperator<V> mergeFunction, Supplier<BiMap<K, V>> mapFactory) - Type Parameters:
T
-K
-V
-- Parameters:
keyMapper
-valueMapper
-mergeFunction
-mapFactory
-- Returns:
-
toMultimap
- Type Parameters:
K
-V
-- Returns:
-
toMultimap
public static <K,V, Collector<Map.Entry<K,C extends Collection<V>, M extends Multimap<K, V, C>> V>, toMultimap?, M> (Supplier<? extends M> mapFactory) - Type Parameters:
K
-V
-C
-M
-- Parameters:
mapFactory
-- Returns:
-
toMultimap
public static <T,K> Collector<T,?, toMultimapListMultimap<K, T>> (Function<? super T, ? extends K> keyMapper) - Type Parameters:
T
-K
-- Parameters:
keyMapper
-- Returns:
-
toMultimap
public static <T,K, Collector<T,C extends Collection<T>, M extends Multimap<K, T, C>> ?, toMultimapM> (Function<? super T, ? extends K> keyMapper, Supplier<? extends M> mapFactory) - Type Parameters:
T
-K
-C
-M
-- Parameters:
keyMapper
-mapFactory
-- Returns:
-
toMultimap
public static <T,K, Collector<T,V> ?, toMultimapListMultimap<K, V>> (Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper) - Type Parameters:
T
-K
-V
-- Parameters:
keyMapper
-valueMapper
-- Returns:
-
toMultimap
public static <T,K, Collector<T,V, C extends Collection<V>, M extends Multimap<K, V, C>> ?, toMultimapM> (Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, Supplier<? extends M> mapFactory) - Type Parameters:
T
-K
-V
-C
-M
-- Parameters:
keyMapper
-valueMapper
-mapFactory
-- Returns:
-
flatMapingValueToMultimap
public static <T,K, Collector<T,V> ?, flatMapingValueToMultimapListMultimap<K, V>> (Function<? super T, K> keyMapper, Function<? super T, ? extends Stream<? extends V>> flatValueMapper) - Type Parameters:
T
-K
-V
-- Parameters:
keyMapper
-flatValueMapper
-- Returns:
- See Also:
-
flatMapingValueToMultimap
public static <T,K, Collector<T,V, C extends Collection<V>, M extends Multimap<K, V, C>> ?, flatMapingValueToMultimapM> (Function<? super T, K> keyMapper, Function<? super T, ? extends Stream<? extends V>> flatValueMapper, Supplier<? extends M> mapFactory) - Type Parameters:
T
-K
-V
-C
-M
-- Parameters:
keyMapper
-flatValueMapper
-mapFactory
-- Returns:
- See Also:
-
flattMapingValueToMultimap
public static <T,K, Collector<T,V> ?, flattMapingValueToMultimapListMultimap<K, V>> (Function<? super T, K> keyMapper, Function<? super T, ? extends Stream<? extends V>> flatValueMapper) - Type Parameters:
T
-K
-V
-- Parameters:
keyMapper
-flatValueMapper
-- Returns:
- See Also:
-
flattMapingValueToMultimap
public static <T,K, Collector<T,V, C extends Collection<V>, M extends Multimap<K, V, C>> ?, flattMapingValueToMultimapM> (Function<? super T, K> keyMapper, Function<? super T, ? extends Stream<? extends V>> flatValueMapper, Supplier<? extends M> mapFactory) - Type Parameters:
T
-K
-V
-C
-M
-- Parameters:
keyMapper
-flatValueMapper
-mapFactory
-- Returns:
- See Also:
-
flatmappingValueToMultimap
public static <T,K, Collector<T,V> ?, flatmappingValueToMultimapListMultimap<K, V>> (Function<? super T, K> keyMapper, Function<? super T, ? extends Collection<? extends V>> flatValueMapper) - Type Parameters:
T
-K
-V
-- Parameters:
keyMapper
-flatValueMapper
-- Returns:
- See Also:
-
flatmappingValueToMultimap
public static <T,K, Collector<T,V, C extends Collection<V>, M extends Multimap<K, V, C>> ?, flatmappingValueToMultimapM> (Function<? super T, K> keyMapper, Function<? super T, ? extends Collection<? extends V>> flatValueMapper, Supplier<? extends M> mapFactory) - Type Parameters:
T
-K
-V
-C
-M
-- Parameters:
keyMapper
-flatValueMapper
-mapFactory
-- Returns:
- See Also:
-
flatMapingKeyToMultimap
public static <T,K, Collector<T,V> ?, flatMapingKeyToMultimapListMultimap<K, V>> (Function<? super T, Stream<? extends K>> flatKeyMapper, Function<? super T, V> valueMapper) - Type Parameters:
T
-K
-V
-- Parameters:
flatKeyMapper
-valueMapper
-- Returns:
- See Also:
-
flatMapingKeyToMultimap
public static <T,K, Collector<T,V, C extends Collection<V>, M extends Multimap<K, V, C>> ?, flatMapingKeyToMultimapM> (Function<? super T, Stream<? extends K>> flatKeyMapper, Function<? super T, V> valueMapper, Supplier<? extends M> mapFactory) - Type Parameters:
T
-K
-V
-C
-M
-- Parameters:
flatKeyMapper
-valueMapper
-mapFactory
-- Returns:
- See Also:
-
flattMapingKeyToMultimap
public static <T,K, Collector<T,V> ?, flattMapingKeyToMultimapListMultimap<K, V>> (Function<? super T, Stream<? extends K>> flatKeyMapper, Function<? super T, V> valueMapper) - Type Parameters:
T
-K
-V
-- Parameters:
flatKeyMapper
-valueMapper
-- Returns:
- See Also:
-
flattMapingKeyToMultimap
public static <T,K, Collector<T,V, C extends Collection<V>, M extends Multimap<K, V, C>> ?, flattMapingKeyToMultimapM> (Function<? super T, Stream<? extends K>> flatKeyMapper, Function<? super T, V> valueMapper, Supplier<? extends M> mapFactory) - Type Parameters:
T
-K
-V
-C
-M
-- Parameters:
flatKeyMapper
-valueMapper
-mapFactory
-- Returns:
- See Also:
-
flatmappingKeyToMultimap
public static <T,K, Collector<T,V> ?, flatmappingKeyToMultimapListMultimap<K, V>> (Function<? super T, ? extends Collection<? extends K>> flatKeyMapper, Function<? super T, V> valueMapper) - Type Parameters:
T
-K
-V
-- Parameters:
flatKeyMapper
-valueMapper
-- Returns:
- See Also:
-
flatmappingKeyToMultimap
public static <T,K, Collector<T,V, C extends Collection<V>, M extends Multimap<K, V, C>> ?, flatmappingKeyToMultimapM> (Function<? super T, ? extends Collection<? extends K>> flatKeyMapper, Function<? super T, V> valueMapper, Supplier<? extends M> mapFactory) - Type Parameters:
T
-K
-V
-C
-M
-- Parameters:
flatKeyMapper
-valueMapper
-mapFactory
-- Returns:
- See Also:
-
teeing
public static <T,R1, Collector<T,R2, R> ?, teeingR> (Collector<? super T, ?, R1> downstream1, Collector<? super T, ?, R2> downstream2, BiFunction<? super R1, ? super R2, R> merger) - Type Parameters:
T
-R1
-R2
-R
-- Parameters:
downstream1
-downstream2
-merger
-- Returns:
-