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> averagingBigDecimalOrThrow
(Function<? super T, BigDecimal> mapper) static <T> Collector<T,
?, u.Optional<BigDecimal>> averagingBigInteger
(Function<? super T, BigInteger> mapper) static <T> Collector<T,
?, BigDecimal> averagingBigIntegerOrThrow
(Function<? super T, BigInteger> mapper) static <T> Collector<T,
?, u.OptionalDouble> averagingDouble
(ToDoubleFunction<? super T> mapper) averagingDoubleOrThrow
(ToDoubleFunction<? super T> mapper) static <T> Collector<T,
?, u.OptionalDouble> averagingInt
(ToIntFunction<? super T> mapper) averagingIntOrThrow
(ToIntFunction<? super T> mapper) static <T> Collector<T,
?, u.OptionalDouble> averagingLong
(ToLongFunction<? super T> mapper) averagingLongOrThrow
(ToLongFunction<? super T> mapper) static <T,
A, R, RR> Collector<T, A, RR> collectingAndThen
(Collector<T, A, R> downstream, Function<R, RR> finisher) combine
(Collection<? extends Collector<? super T, ?, ?>> collectors) static <T,
A1, A2, R1, R2>
Collector<T,Tuple.Tuple2<A1, A2>, Tuple.Tuple2<R1, R2>> static <T,
A1, A2, R1, R2, R>
Collector<T,Tuple.Tuple2<A1, A2>, R> combine
(Collector<? super T, A1, R1> collector1, Collector<? super T, A2, R2> collector2, BiFunction<? super R1, ? super R2, R> finisher) static <T,
A1, A2, A3, R1, R2, R3>
Collector<T,Tuple.Tuple3<A1, A2, A3>, Tuple.Tuple3<R1, R2, R3>> combine
(Collector<? super T, A1, R1> collector1, Collector<? super T, A2, R2> collector2, Collector<? super T, A3, R3> collector3) static <T,
A1, A2, A3, R1, R2, R3, R>
Collector<T,Tuple.Tuple3<A1, A2, A3>, R> combine
(Collector<? super T, A1, R1> collector1, Collector<? super T, A2, R2> collector2, Collector<? super T, A3, R3> collector3, TriFunction<? super R1, ? super R2, ? super R3, R> finisher) static <T,
A1, A2, A3, A4, R1, R2, R3, R4>
Collector<T,Tuple.Tuple4<A1, A2, A3, A4>, Tuple.Tuple4<R1, R2, R3, R4>> combine
(Collector<? super T, A1, R1> collector1, Collector<? super T, A2, R2> collector2, Collector<? super T, A3, R3> collector3, Collector<? super T, A4, R4> collector4) static <T,
A1, A2, A3, A4, A5, R1, R2, R3, R4, R5>
Collector<T,Tuple.Tuple5<A1, A2, A3, A4, A5>, Tuple.Tuple5<R1, R2, R3, R4, R5>> combine
(Collector<? super T, A1, R1> collector1, Collector<? super T, A2, R2> collector2, Collector<? super T, A3, R3> collector3, Collector<? super T, A4, R4> collector4, Collector<? super T, A5, R5> collector5) 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) countingIntBy
(Function<? super T, ? extends K> keyMapper) countingIntBy
(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.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,
A, D> Collector<T, ?, D> maxAll
(Comparator<? super T> comparator, Collector<? super T, A, D> downstream) It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.static <T extends Comparable,
A, D>
Collector<T,?, D> It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.static <T,
A, D> Collector<T, ?, u.Optional<Pair<T, D>>> maxAlll
(Comparator<? super T> comparator, Collector<? super T, A, D> downstream) static <T,
A, D, R> Collector<T, ?, R> maxAlll
(Comparator<? super T> comparator, Collector<? super T, A, D> downstream, Function<u.Optional<Pair<T, D>>, R> finisher) static <T extends Comparable,
A, D>
Collector<T,?, u.Optional<Pair<T, D>>> static <T> Collector<T,
?, u.Optional<T>> maxBy
(Function<? super T, ? extends Comparable> keyMapper) static <T> Collector<T,
?, T> maxByOrGet
(Function<? super T, ? extends Comparable> keyMapper, Supplier<? extends T> other) static <T> Collector<T,
?, T> maxByOrThrow
(Function<? super T, ? extends Comparable> keyMapper) static <T> Collector<T,
?, T> maxByOrThrow
(Function<? super T, ? extends Comparable> keyMapper, Supplier<? extends RuntimeException> exceptionSupplier) static <T> Collector<T,
?, T> maxOrGet
(Comparator<? super T> comparator, Supplier<? extends T> other) static <T extends Comparable<? super T>>
Collector<T,?, T> static <T extends Comparable<? super T>>
Collector<T,?, T> static <T> Collector<T,
?, T> maxOrThrow
(Comparator<? super T> comparator) static <T> Collector<T,
?, T> maxOrThrow
(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, D> Collector<T, ?, D> minAll
(Comparator<? super T> comparator, Collector<T, A, D> downstream) It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.static <T extends Comparable,
A, D>
Collector<T,?, D> It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified.static <T,
A, D> Collector<T, ?, u.Optional<Pair<T, D>>> minAlll
(Comparator<? super T> comparator, Collector<? super T, A, D> downstream) static <T,
A, D, R> Collector<T, ?, R> minAlll
(Comparator<? super T> comparator, Collector<? super T, A, D> downstream, Function<u.Optional<Pair<T, D>>, R> finisher) static <T extends Comparable,
A, D>
Collector<T,?, u.Optional<Pair<T, D>>> static <T> Collector<T,
?, u.Optional<T>> minBy
(Function<? super T, ? extends Comparable> keyMapper) static <T> Collector<T,
?, T> minByOrGet
(Function<? super T, ? extends Comparable> keyMapper, Supplier<? extends T> other) static <T> Collector<T,
?, T> minByOrThrow
(Function<? super T, ? extends Comparable> keyMapper) static <T> Collector<T,
?, T> minByOrThrow
(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) static <T extends Comparable<? super T>>
Collector<T,?, Pair<T, T>> minMaxOrThrow
(Comparator<? super T> comparator) static <T> Collector<T,
?, T> minOrGet
(Comparator<? super T> comparator, Supplier<? extends T> other) static <T extends Comparable<? super T>>
Collector<T,?, T> static <T extends Comparable<? super T>>
Collector<T,?, T> static <T> Collector<T,
?, T> minOrThrow
(Comparator<? super T> comparator) static <T> Collector<T,
?, T> minOrThrow
(Comparator<? super T> comparator, Supplier<? extends RuntimeException> exceptionSupplier) static <T> Collector<T,
?, u.Optional<T>> onlyOne()
DuplicatedResultException
is threw if there are more than one values are collected.static <T> Collector<T,
?, u.Optional<T>> DuplicatedResultException
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,
U> Collector<T, ?, u.Optional<U>> reducing
(Function<? super T, ? extends U> mapper, BinaryOperator<U> 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,
?, T> reducingOrGet
(BinaryOperator<T> op, Supplier<? extends T> other) static <T,
U> Collector<T, ?, U> reducingOrGet
(Function<? super T, ? extends U> mapper, BinaryOperator<U> op, Supplier<? extends U> other) static <T> Collector<T,
?, T> reducingOrThrow
(BinaryOperator<T> op) static <T> Collector<T,
?, T> reducingOrThrow
(BinaryOperator<T> op, Supplier<? extends RuntimeException> exceptionSupplier) static <T,
U> Collector<T, ?, U> reducingOrThrow
(Function<? super T, ? extends U> mapper, BinaryOperator<U> op) static <T,
U> Collector<T, ?, U> reducingOrThrow
(Function<? super T, ? extends U> mapper, BinaryOperator<U> 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) summingLong
(ToLongFunction<? super T> mapper) 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<? extends K, ? extends 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<? extends K,? extends 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) -
toList
-
toLinkedList
-
toImmutableList
-
toSet
-
toLinkedHashSet
-
toImmutableSet
-
toQueue
-
toDeque
-
toCollection
public static <T,C extends Collection<T>> Collector<T,?, toCollectionC> (Supplier<? extends C> collectionFactory, int atMostSize) -
toList
-
toSet
-
toMultiset
-
toMultiset
-
toLongMultiset
-
toLongMultiset
-
toArray
-
toArray
-
toArray
-
toBooleanList
-
toBooleanArray
-
toCharList
-
toCharArray
-
toByteList
-
toByteArray
-
toShortList
-
toShortArray
-
toIntList
-
toIntArray
-
toLongList
-
toLongArray
-
toFloatList
-
toFloatArray
-
toDoubleList
-
toDoubleArray
-
onlyOne
DuplicatedResultException
is threw if there are more than one values are collected.- Returns:
-
onlyOne
DuplicatedResultException
is threw if there are more than one values are collected.- Parameters:
predicate
-- Returns:
-
first
Only works for sequential Stream.- Returns:
- Throws:
UnsupportedOperationException
- operated by multiple threads
-
last
Only works for sequential Stream.- Returns:
- Throws:
UnsupportedOperationException
- operated by multiple threads
-
first
Only works for sequential Stream.- Parameters:
n
-- Returns:
- Throws:
UnsupportedOperationException
- operated by multiple threads
-
last
Only works for sequential Stream.- Parameters:
n
-- Returns:
- Throws:
UnsupportedOperationException
- operated by multiple threads
-
joining
-
joining
-
joining
public static Collector<CharSequence,?, joiningString> (CharSequence delimiter, CharSequence prefix, CharSequence suffix) -
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
-
mapping
-
flattMaping
-
flattMaping
-
flatmapping
public static <T,U> Collector<T,?, flatmappingList<U>> (Function<? super T, ? extends Collection<? extends U>> mapper) -
flatmapping
public static <T,U, Collector<T,A, R> ?, flatmappingR> (Function<? super T, ? extends Collection<? extends U>> mapper, Collector<? super U, A, R> downstream) -
flattMaping
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) -
flattMaping
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) -
flatmapping
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) -
flatmapping
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) -
collectingAndThen
-
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) -
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
-
countingInt
-
min
-
min
-
minOrGet
public static <T extends Comparable<? super T>> Collector<T,?, minOrGetT> (Supplier<? extends T> other) -
minOrGet
public static <T> Collector<T,?, minOrGetT> (Comparator<? super T> comparator, Supplier<? extends T> other) -
minOrThrow
-
minOrThrow
-
minOrThrow
public static <T> Collector<T,?, minOrThrowT> (Comparator<? super T> comparator, Supplier<? extends RuntimeException> exceptionSupplier) -
minBy
public static <T> Collector<T,?, minByu.Optional<T>> (Function<? super T, ? extends Comparable> keyMapper) -
minByOrGet
public static <T> Collector<T,?, minByOrGetT> (Function<? super T, ? extends Comparable> keyMapper, Supplier<? extends T> other) -
minByOrThrow
-
minByOrThrow
public static <T> Collector<T,?, minByOrThrowT> (Function<? super T, ? extends Comparable> keyMapper, Supplier<? extends RuntimeException> exceptionSupplier) -
max
-
max
-
maxOrGet
public static <T extends Comparable<? super T>> Collector<T,?, maxOrGetT> (Supplier<? extends T> other) -
maxOrGet
public static <T> Collector<T,?, maxOrGetT> (Comparator<? super T> comparator, Supplier<? extends T> other) -
maxOrThrow
-
maxOrThrow
-
maxOrThrow
public static <T> Collector<T,?, maxOrThrowT> (Comparator<? super T> comparator, Supplier<? extends RuntimeException> exceptionSupplier) -
maxBy
public static <T> Collector<T,?, maxByu.Optional<T>> (Function<? super T, ? extends Comparable> keyMapper) -
maxByOrGet
public static <T> Collector<T,?, maxByOrGetT> (Function<? super T, ? extends Comparable> keyMapper, Supplier<? extends T> other) -
maxByOrThrow
-
maxByOrThrow
public static <T> Collector<T,?, maxByOrThrowT> (Function<? super T, ? extends Comparable> keyMapper, Supplier<? extends RuntimeException> exceptionSupplier) -
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
- 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 collectorD
- 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,D> ?, minAllD> (Comparator<? super T> comparator, Collector<T, A, D> 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 collectorD
- 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,A, Collector<T,D> ?, minAlllu.Optional<Pair<T, D>>> (Collector<T, A, D> downstream) -
minAlll
public static <T,A, Collector<T,D> ?, minAlllu.Optional<Pair<T, D>>> (Comparator<? super T> comparator, Collector<? super T, A, D> downstream) -
minAlll
public static <T,A, Collector<T,D, R> ?, minAlllR> (Comparator<? super T> comparator, Collector<? super T, A, D> downstream, Function<u.Optional<Pair<T, D>>, R> finisher) -
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
- 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 collectorD
- 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,A, Collector<T,D> ?, maxAllD> (Comparator<? super T> comparator, Collector<? super T, A, D> 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 collectorD
- 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,A, Collector<T,D> ?, maxAlllu.Optional<Pair<T, D>>> (Collector<T, A, D> downstream) -
maxAlll
public static <T,A, Collector<T,D> ?, maxAlllu.Optional<Pair<T, D>>> (Comparator<? super T> comparator, Collector<? super T, A, D> downstream) -
maxAlll
public static <T,A, Collector<T,D, R> ?, maxAlllR> (Comparator<? super T> comparator, Collector<? super T, A, D> downstream, Function<u.Optional<Pair<T, D>>, R> finisher) -
minMax
-
minMax
- 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) -
minMaxBy
public static <T,R> Collector<T,?, minMaxByu.Optional<R>> (Function<? super T, ? extends Comparable> keyMapper, BiFunction<? super T, ? super T, ? extends R> finisher) -
minMaxOrThrow
-
minMaxOrThrow
-
summingInt
-
summingLong
-
summingDouble
-
summingBigInteger
public static <T> Collector<T,?, summingBigIntegerBigInteger> (Function<? super T, BigInteger> mapper) -
summingBigDecimal
public static <T> Collector<T,?, summingBigDecimalBigDecimal> (Function<? super T, BigDecimal> mapper) -
averagingInt
-
averagingIntOrThrow
-
averagingLong
-
averagingLongOrThrow
-
averagingDouble
public static <T> Collector<T,?, averagingDoubleu.OptionalDouble> (ToDoubleFunction<? super T> mapper) -
averagingDoubleOrThrow
-
averagingBigInteger
public static <T> Collector<T,?, averagingBigIntegeru.Optional<BigDecimal>> (Function<? super T, BigInteger> mapper) -
averagingBigIntegerOrThrow
public static <T> Collector<T,?, averagingBigIntegerOrThrowBigDecimal> (Function<? super T, BigInteger> mapper) -
averagingBigDecimal
public static <T> Collector<T,?, averagingBigDecimalu.Optional<BigDecimal>> (Function<? super T, BigDecimal> mapper) -
averagingBigDecimalOrThrow
public static <T> Collector<T,?, averagingBigDecimalOrThrowBigDecimal> (Function<? super T, BigDecimal> mapper) -
summarizingChar
public static <T> Collector<T,?, summarizingCharCharSummaryStatistics> (ToCharFunction<? super T> mapper) -
summarizingByte
public static <T> Collector<T,?, summarizingByteByteSummaryStatistics> (ToByteFunction<? super T> mapper) -
summarizingShort
public static <T> Collector<T,?, summarizingShortShortSummaryStatistics> (ToShortFunction<? super T> mapper) -
summarizingInt
public static <T> Collector<T,?, summarizingIntIntSummaryStatistics> (ToIntFunction<? super T> mapper) -
summarizingLong
public static <T> Collector<T,?, summarizingLongLongSummaryStatistics> (ToLongFunction<? super T> mapper) -
summarizingFloat
public static <T> Collector<T,?, summarizingFloatFloatSummaryStatistics> (ToFloatFunction<? super T> mapper) -
summarizingDouble
public static <T> Collector<T,?, summarizingDoubleDoubleSummaryStatistics> (ToDoubleFunction<? super T> mapper) -
summarizingBigInteger
public static <T> Collector<T,?, summarizingBigIntegerBigIntegerSummaryStatistics> (Function<? super T, BigInteger> mapper) -
summarizingBigDecimal
public static <T> Collector<T,?, summarizingBigDecimalBigDecimalSummaryStatistics> (Function<? super T, BigDecimal> mapper) -
reducing
-
reducing
-
reducingOrGet
-
reducingOrThrow
public static <T> Collector<T,?, reducingOrThrowT> (BinaryOperator<T> op, Supplier<? extends RuntimeException> exceptionSupplier) -
reducingOrThrow
-
reducing
public static <T,U> Collector<T,?, reducingU> (U identity, Function<? super T, ? extends U> mapper, BinaryOperator<U> op) -
reducing
public static <T,U> Collector<T,?, reducingu.Optional<U>> (Function<? super T, ? extends U> mapper, BinaryOperator<U> op) -
reducingOrGet
public static <T,U> Collector<T,?, reducingOrGetU> (Function<? super T, ? extends U> mapper, BinaryOperator<U> op, Supplier<? extends U> other) -
reducingOrThrow
public static <T,U> Collector<T,?, reducingOrThrowU> (Function<? super T, ? extends U> mapper, BinaryOperator<U> op, Supplier<? extends RuntimeException> exceptionSupplier) -
reducingOrThrow
public static <T,U> Collector<T,?, reducingOrThrowU> (Function<? super T, ? extends U> mapper, BinaryOperator<U> op) -
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
-
groupingBy
-
groupingBy
-
groupingBy
-
groupingByConcurrent
public static <T,K> Collector<T,?, groupingByConcurrentConcurrentMap<K, List<T>>> (Function<? super T, ? extends K> keyMapper) -
groupingByConcurrent
public static <T,K, Collector<T,M extends ConcurrentMap<K, List<T>>> ?, groupingByConcurrentM> (Function<? super T, ? extends K> keyMapper, Supplier<? extends M> mapFactory) -
groupingByConcurrent
public static <T,K, Collector<T,A, D> ?, groupingByConcurrentConcurrentMap<K, D>> (Function<? super T, ? extends K> keyMapper, Collector<? super T, A, D> downstream) -
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) -
partitioningBy
-
partitioningBy
-
countingBy
-
countingBy
-
countingIntBy
-
countingIntBy
-
toMap
-
toMap
-
toMap
-
toMap
public static <K,V, Collector<Map.Entry<K,M extends Map<K, V>> V>, toMap?, M> (BinaryOperator<V> mergeFunction, Supplier<? extends M> mapFactory) -
toMap
-
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) -
toMap
-
toMap
-
toImmutableMap
-
toImmutableMap
public static <K,V> Collector<Map.Entry<K,V>, toImmutableMap?, ImmutableMap<K, V>> (BinaryOperator<V> mergeFunction) -
toImmutableMap
public static <T,K, Collector<T,V> ?, toImmutableMapImmutableMap<K, V>> (Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper) -
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) -
toLinkedHashMap
public static <T,K, Collector<T,V> ?, toLinkedHashMapMap<K, V>> (Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper) - 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) - 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) -
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) -
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) -
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) -
toBiMap
-
toBiMap
-
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) -
toBiMap
-
toMultimap
-
toMultimap
public static <K,V, Collector<Map.Entry<? extends K,C extends Collection<V>, M extends Multimap<K, V, C>> ? extends V>, toMultimap?, M> (Supplier<? extends M> mapFactory) -
toMultimap
public static <T,K> Collector<T,?, toMultimapListMultimap<K, T>> (Function<? super T, ? extends K> keyMapper) -
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) -
toMultimap
public static <T,K, Collector<T,V> ?, toMultimapListMultimap<K, V>> (Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper) -
toMultimap
-
flattMapingValueToMultimap
public static <T,K, Collector<T,V> ?, flattMapingValueToMultimapListMultimap<K, V>> (Function<? super T, K> keyMapper, Function<? super T, ? extends Stream<? extends V>> flatValueMapper) - 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) - 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) - 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) - Parameters:
keyMapper
-flatValueMapper
-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) - 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) - 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) - 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) - Parameters:
flatKeyMapper
-valueMapper
-mapFactory
-- Returns:
- See Also:
-
toDataSet
-
toDataSet
-
combine
public static <T,A1, Collector<T,A2, R1, R2> Tuple.Tuple2<A1, combineA2>, Tuple.Tuple2<R1, R2>> (Collector<? super T, A1, R1> collector1, Collector<? super T, A2, R2> collector2) -
combine
public static <T,A1, Collector<T,A2, R1, R2, R> Tuple.Tuple2<A1, combineA2>, R> (Collector<? super T, A1, R1> collector1, Collector<? super T, A2, R2> collector2, BiFunction<? super R1, ? super R2, R> finisher) -
combine
public static <T,A1, Collector<T,A2, A3, R1, R2, R3> Tuple.Tuple3<A1, combineA2, A3>, Tuple.Tuple3<R1, R2, R3>> (Collector<? super T, A1, R1> collector1, Collector<? super T, A2, R2> collector2, Collector<? super T, A3, R3> collector3) -
combine
public static <T,A1, Collector<T,A2, A3, R1, R2, R3, R> Tuple.Tuple3<A1, combineA2, A3>, R> (Collector<? super T, A1, R1> collector1, Collector<? super T, A2, R2> collector2, Collector<? super T, A3, R3> collector3, TriFunction<? super R1, ? super R2, ? super R3, R> finisher) -
combine
public static <T,A1, Collector<T,A2, A3, A4, R1, R2, R3, R4> Tuple.Tuple4<A1, combineA2, A3, A4>, Tuple.Tuple4<R1, R2, R3, R4>> (Collector<? super T, A1, R1> collector1, Collector<? super T, A2, R2> collector2, Collector<? super T, A3, R3> collector3, Collector<? super T, A4, R4> collector4) -
combine
public static <T,A1, Collector<T,A2, A3, A4, A5, R1, R2, R3, R4, R5> Tuple.Tuple5<A1, combineA2, A3, A4, A5>, Tuple.Tuple5<R1, R2, R3, R4, R5>> (Collector<? super T, A1, R1> collector1, Collector<? super T, A2, R2> collector2, Collector<? super T, A3, R3> collector3, Collector<? super T, A4, R4> collector4, Collector<? super T, A5, R5> collector5) -
combine
public static <T> Collector<T,?, combineList<?>> (Collection<? extends Collector<? super T, ?, ?>> collectors) - Parameters:
collectors
-- Returns:
- See Also:
-