public interface Collectable<T>
A common super type for types like
Seq or Window delegating
common aggregation functions to collect(Collector)- Author:
- Lukas Eder
-
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether all elements in the collectable match a given predicate.booleanWhether any element in the collectable matches a given predicate.avg()Get the average of the elements in this collectable.<U> Optional<U>Get the average of the elements in this collectable.doubleavgDouble(ToDoubleFunction<? super T> function) Get the average of the elements in this collectable asdouble.doubleavgInt(ToIntFunction<? super T> function) Get the average of the elements in this collectable asint.doubleavgLong(ToLongFunction<? super T> function) Get the average of the elements in this collectable aslong.bitAnd()Collect all bits in this stream into a single value by applying bitwise and.<U> Optional<U>Collect all bits in this stream into a single value by applying bitwise and.intbitAndInt(ToIntFunction<? super T> function) Collect all bits in this stream into a single value by applying bitwise and.longbitAndLong(ToLongFunction<? super T> function) Collect all bits in this stream into a single value by applying bitwise and.bitOr()Collect all bits in this stream into a single value by applying bitwise or.<U> Optional<U>Collect all bits in this stream into a single value by applying bitwise or.intbitOrInt(ToIntFunction<? super T> function) Collect all bits in this stream into a single value by applying bitwise or.longbitOrLong(ToLongFunction<? super T> function) Collect all bits in this stream into a single value by applying bitwise or.<R,A> R Collect this collectable.default <R1,R2, A1, A2>
Tuple2<R1,R2> Collect this collectable into 2Collectors.default <R1,R2, R3, A1, A2, A3>
Tuple3<R1,R2, R3> collect(Collector<? super T, A1, R1> collector1, Collector<? super T, A2, R2> collector2, Collector<? super T, A3, R3> collector3) Collect this collectable into 3Collectors.default <R1,R2, R3, R4, A1, A2, A3, A4>
Tuple4<R1,R2, R3, R4> collect(Collector<? super T, A1, R1> collector1, Collector<? super T, A2, R2> collector2, Collector<? super T, A3, R3> collector3, Collector<? super T, A4, R4> collector4) Collect this collectable into 4Collectors.default <R1,R2, R3, R4, R5, A1, A2, A3, A4, A5>
Tuple5<R1,R2, R3, R4, R5> collect(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) Collect this collectable into 5Collectors.default <R1,R2, R3, R4, R5, R6, A1, A2, A3, A4, A5, A6>
Tuple6<R1,R2, R3, R4, R5, R6> collect(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, Collector<? super T, A6, R6> collector6) Collect this collectable into 6Collectors.default <R1,R2, R3, R4, R5, R6, R7, A1, A2, A3, A4, A5, A6, A7>
Tuple7<R1,R2, R3, R4, R5, R6, R7> collect(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, Collector<? super T, A6, R6> collector6, Collector<? super T, A7, R7> collector7) Collect this collectable into 7Collectors.default <R1,R2, R3, R4, R5, R6, R7, R8, A1, A2, A3, A4, A5, A6, A7, A8>
Tuple8<R1,R2, R3, R4, R5, R6, R7, R8> collect(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, Collector<? super T, A6, R6> collector6, Collector<? super T, A7, R7> collector7, Collector<? super T, A8, R8> collector8) Collect this collectable into 8Collectors.default <R1,R2, R3, R4, R5, R6, R7, R8, R9, A1, A2, A3, A4, A5, A6, A7, A8, A9>
Tuple9<R1,R2, R3, R4, R5, R6, R7, R8, R9> collect(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, Collector<? super T, A6, R6> collector6, Collector<? super T, A7, R7> collector7, Collector<? super T, A8, R8> collector8, Collector<? super T, A9, R9> collector9) Collect this collectable into 9Collectors.default <R1,R2, R3, R4, R5, R6, R7, R8, R9, R10, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>
Tuple10<R1,R2, R3, R4, R5, R6, R7, R8, R9, R10> collect(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, Collector<? super T, A6, R6> collector6, Collector<? super T, A7, R7> collector7, Collector<? super T, A8, R8> collector8, Collector<? super T, A9, R9> collector9, Collector<? super T, A10, R10> collector10) Collect this collectable into 10Collectors.default <R1,R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>
Tuple11<R1,R2, R3, R4, R5, R6, R7, R8, R9, R10, R11> collect(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, Collector<? super T, A6, R6> collector6, Collector<? super T, A7, R7> collector7, Collector<? super T, A8, R8> collector8, Collector<? super T, A9, R9> collector9, Collector<? super T, A10, R10> collector10, Collector<? super T, A11, R11> collector11) Collect this collectable into 11Collectors.default <R1,R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12>
Tuple12<R1,R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12> collect(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, Collector<? super T, A6, R6> collector6, Collector<? super T, A7, R7> collector7, Collector<? super T, A8, R8> collector8, Collector<? super T, A9, R9> collector9, Collector<? super T, A10, R10> collector10, Collector<? super T, A11, R11> collector11, Collector<? super T, A12, R12> collector12) Collect this collectable into 12Collectors.default <R1,R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13>
Tuple13<R1,R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13> collect(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, Collector<? super T, A6, R6> collector6, Collector<? super T, A7, R7> collector7, Collector<? super T, A8, R8> collector8, Collector<? super T, A9, R9> collector9, Collector<? super T, A10, R10> collector10, Collector<? super T, A11, R11> collector11, Collector<? super T, A12, R12> collector12, Collector<? super T, A13, R13> collector13) Collect this collectable into 13Collectors.default <R1,R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14>
Tuple14<R1,R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14> collect(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, Collector<? super T, A6, R6> collector6, Collector<? super T, A7, R7> collector7, Collector<? super T, A8, R8> collector8, Collector<? super T, A9, R9> collector9, Collector<? super T, A10, R10> collector10, Collector<? super T, A11, R11> collector11, Collector<? super T, A12, R12> collector12, Collector<? super T, A13, R13> collector13, Collector<? super T, A14, R14> collector14) Collect this collectable into 14Collectors.default <R1,R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15>
Tuple15<R1,R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15> collect(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, Collector<? super T, A6, R6> collector6, Collector<? super T, A7, R7> collector7, Collector<? super T, A8, R8> collector8, Collector<? super T, A9, R9> collector9, Collector<? super T, A10, R10> collector10, Collector<? super T, A11, R11> collector11, Collector<? super T, A12, R12> collector12, Collector<? super T, A13, R13> collector13, Collector<? super T, A14, R14> collector14, Collector<? super T, A15, R15> collector15) Collect this collectable into 15Collectors.default <R1,R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, R16, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16>
Tuple16<R1,R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, R16> collect(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, Collector<? super T, A6, R6> collector6, Collector<? super T, A7, R7> collector7, Collector<? super T, A8, R8> collector8, Collector<? super T, A9, R9> collector9, Collector<? super T, A10, R10> collector10, Collector<? super T, A11, R11> collector11, Collector<? super T, A12, R12> collector12, Collector<? super T, A13, R13> collector13, Collector<? super T, A14, R14> collector14, Collector<? super T, A15, R15> collector15, Collector<? super T, A16, R16> collector16) Collect this collectable into 16Collectors.Get the common prefix of all strings (or to-stringed values) in this stream.Get the common prefix of all strings (or to-stringed values) in this stream.longcount()Count the values in this collectable.longCount the values in this collectable, for which a predicate evaluates to true.longCount the distinct values in this collectable.longcountDistinct(Predicate<? super T> predicate) Count the distinct values in this collectable, for which a predicate evaluates to true.<U> longcountDistinctBy(Function<? super T, ? extends U> function) Count the distinct values of a given expression in this collectable.<U> longcountDistinctBy(Function<? super T, ? extends U> function, Predicate<? super U> predicate) Count the distinct values of a given expression in this collectable, for which a predicate evaluates to true.max()Get the maximum value.max(Comparator<? super T> comparator) Get the maximum value by a function.<U extends Comparable<? super U>>
Optional<U>Get the maximum value by a function.<U> Optional<U>max(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Get the maximum value by a function.maxAll()Get the maximum values.maxAll(Comparator<? super T> comparator) Get the maximum values by a function.<U extends Comparable<? super U>>
Seq<U>Get the maximum values by a function.<U> Seq<U>maxAll(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Get the maximum values by a function.<U extends Comparable<? super U>>
Seq<T>Get the maximum values by a function.maxAllBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Get the maximum values by a function.<U extends Comparable<? super U>>
Optional<T>Get the maximum value by a function.maxBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Get the maximum value by a function.median()Get the median value.median(Comparator<? super T> comparator) Get the median value.<U extends Comparable<? super U>>
Optional<T>Get the median value by a function.medianBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Get the median value by a function.min()Get the minimum value.min(Comparator<? super T> comparator) Get the minimum value by a function.<U extends Comparable<? super U>>
Optional<U>Get the minimum value by a function.<U> Optional<U>min(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Get the minimum value by a function.minAll()Get the minimum values.minAll(Comparator<? super T> comparator) Get the minimum values by a function.<U extends Comparable<? super U>>
Seq<U>Get the minimum values by a function.<U> Seq<U>minAll(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Get the minimum values by a function.<U extends Comparable<? super U>>
Seq<T>Get the minimum values by a function.minAllBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Get the minimum values by a function.<U extends Comparable<? super U>>
Optional<T>Get the minimum value by a function.minBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Get the minimum value by a function.mode()Get the mode, i.e. the value that appears most often in the collectable.modeAll()Get the mode, i.e. the values that appear most often in the collectable.Get the mode, i.e. the values that appear most often in the collectable.Get the mode, i.e. the value that appears most often in the collectable.booleanWhether no element in the collectable matches a given predicate.percentile(double percentile) Get the discrete percentile value.percentile(double percentile, Comparator<? super T> comparator) Get the discrete percentile value.<U extends Comparable<? super U>>
Optional<T>percentileBy(double percentile, Function<? super T, ? extends U> function) Get the discrete percentile value by a function.percentileBy(double percentile, Function<? super T, ? extends U> function, Comparator<? super U> comparator) Get the discrete percentile value by a function.sum()Get the sum of the elements in this collectable.<U> Optional<U>Get the sum of the elements in this collectable.doublesumDouble(ToDoubleFunction<? super T> function) Get the sum of the elements in this collectable asdouble.intsumInt(ToIntFunction<? super T> function) Get the sum of the elements in this collectable asint.longsumLong(ToLongFunction<? super T> function) Get the sum of the elements in this collectable aslong.<C extends Collection<T>>
CtoCollection(Supplier<C> factory) Collect the collectable into aCollection.toList()Collect the collectable into anArrayList.Collect the collectable into aList.Collect the collectable into aMapwith the given keys and the self element as value.<K,V> Map<K, V> Collect the collectable into aMap.toSet()Collect the collectable into aLinkedHashSet.Collect the collectable into aSet.toString(CharSequence delimiter) Consume a stream and concatenate all elements using a separator.toString(CharSequence delimiter, CharSequence prefix, CharSequence suffix) Shortcut for callingStream.collect(Collector)with aCollectors.joining(CharSequence, CharSequence, CharSequence)collector.Collect the collectable into an unmodifiableList.Collect the collectable into an unmodifiableSet.
-
Method Details
-
collect
Collect this collectable. -
collect
default <R1,R2, Tuple2<R1,A1, A2> R2> collect(Collector<? super T, A1, R1> collector1, Collector<? super T, A2, R2> collector2) Collect this collectable into 2Collectors. -
collect
default <R1,R2, Tuple3<R1,R3, A1, A2, A3> R2, collectR3> (Collector<? super T, A1, R1> collector1, Collector<? super T, A2, R2> collector2, Collector<? super T, A3, R3> collector3) Collect this collectable into 3Collectors. -
collect
default <R1,R2, Tuple4<R1,R3, R4, A1, A2, A3, A4> R2, collectR3, 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) Collect this collectable into 4Collectors. -
collect
default <R1,R2, Tuple5<R1,R3, R4, R5, A1, A2, A3, A4, A5> R2, collectR3, 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) Collect this collectable into 5Collectors. -
collect
default <R1,R2, Tuple6<R1,R3, R4, R5, R6, A1, A2, A3, A4, A5, A6> R2, collectR3, R4, R5, R6> (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, Collector<? super T, A6, R6> collector6) Collect this collectable into 6Collectors. -
collect
default <R1,R2, Tuple7<R1,R3, R4, R5, R6, R7, A1, A2, A3, A4, A5, A6, A7> R2, collectR3, R4, R5, R6, R7> (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, Collector<? super T, A6, R6> collector6, Collector<? super T, A7, R7> collector7) Collect this collectable into 7Collectors. -
collect
default <R1,R2, Tuple8<R1,R3, R4, R5, R6, R7, R8, A1, A2, A3, A4, A5, A6, A7, A8> R2, collectR3, R4, R5, R6, R7, R8> (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, Collector<? super T, A6, R6> collector6, Collector<? super T, A7, R7> collector7, Collector<? super T, A8, R8> collector8) Collect this collectable into 8Collectors. -
collect
default <R1,R2, Tuple9<R1,R3, R4, R5, R6, R7, R8, R9, A1, A2, A3, A4, A5, A6, A7, A8, A9> R2, collectR3, R4, R5, R6, R7, R8, R9> (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, Collector<? super T, A6, R6> collector6, Collector<? super T, A7, R7> collector7, Collector<? super T, A8, R8> collector8, Collector<? super T, A9, R9> collector9) Collect this collectable into 9Collectors. -
collect
default <R1,R2, Tuple10<R1,R3, R4, R5, R6, R7, R8, R9, R10, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10> R2, collectR3, R4, R5, R6, R7, R8, R9, R10> (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, Collector<? super T, A6, R6> collector6, Collector<? super T, A7, R7> collector7, Collector<? super T, A8, R8> collector8, Collector<? super T, A9, R9> collector9, Collector<? super T, A10, R10> collector10) Collect this collectable into 10Collectors. -
collect
default <R1,R2, Tuple11<R1,R3, R4, R5, R6, R7, R8, R9, R10, R11, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11> R2, collectR3, R4, R5, R6, R7, R8, R9, R10, R11> (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, Collector<? super T, A6, R6> collector6, Collector<? super T, A7, R7> collector7, Collector<? super T, A8, R8> collector8, Collector<? super T, A9, R9> collector9, Collector<? super T, A10, R10> collector10, Collector<? super T, A11, R11> collector11) Collect this collectable into 11Collectors. -
collect
default <R1,R2, Tuple12<R1,R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12> R2, collectR3, R4, R5, R6, R7, R8, R9, R10, R11, R12> (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, Collector<? super T, A6, R6> collector6, Collector<? super T, A7, R7> collector7, Collector<? super T, A8, R8> collector8, Collector<? super T, A9, R9> collector9, Collector<? super T, A10, R10> collector10, Collector<? super T, A11, R11> collector11, Collector<? super T, A12, R12> collector12) Collect this collectable into 12Collectors. -
collect
default <R1,R2, Tuple13<R1,R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13> R2, collectR3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13> (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, Collector<? super T, A6, R6> collector6, Collector<? super T, A7, R7> collector7, Collector<? super T, A8, R8> collector8, Collector<? super T, A9, R9> collector9, Collector<? super T, A10, R10> collector10, Collector<? super T, A11, R11> collector11, Collector<? super T, A12, R12> collector12, Collector<? super T, A13, R13> collector13) Collect this collectable into 13Collectors. -
collect
default <R1,R2, Tuple14<R1,R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14> R2, collectR3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14> (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, Collector<? super T, A6, R6> collector6, Collector<? super T, A7, R7> collector7, Collector<? super T, A8, R8> collector8, Collector<? super T, A9, R9> collector9, Collector<? super T, A10, R10> collector10, Collector<? super T, A11, R11> collector11, Collector<? super T, A12, R12> collector12, Collector<? super T, A13, R13> collector13, Collector<? super T, A14, R14> collector14) Collect this collectable into 14Collectors. -
collect
default <R1,R2, Tuple15<R1,R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15> R2, collectR3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15> (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, Collector<? super T, A6, R6> collector6, Collector<? super T, A7, R7> collector7, Collector<? super T, A8, R8> collector8, Collector<? super T, A9, R9> collector9, Collector<? super T, A10, R10> collector10, Collector<? super T, A11, R11> collector11, Collector<? super T, A12, R12> collector12, Collector<? super T, A13, R13> collector13, Collector<? super T, A14, R14> collector14, Collector<? super T, A15, R15> collector15) Collect this collectable into 15Collectors. -
collect
default <R1,R2, Tuple16<R1,R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, R16, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16> R2, collectR3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, R16> (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, Collector<? super T, A6, R6> collector6, Collector<? super T, A7, R7> collector7, Collector<? super T, A8, R8> collector8, Collector<? super T, A9, R9> collector9, Collector<? super T, A10, R10> collector10, Collector<? super T, A11, R11> collector11, Collector<? super T, A12, R12> collector12, Collector<? super T, A13, R13> collector13, Collector<? super T, A14, R14> collector14, Collector<? super T, A15, R15> collector15, Collector<? super T, A16, R16> collector16) Collect this collectable into 16Collectors. -
count
long count()Count the values in this collectable. -
count
Count the values in this collectable, for which a predicate evaluates to true. -
countDistinct
long countDistinct()Count the distinct values in this collectable. -
countDistinct
Count the distinct values in this collectable, for which a predicate evaluates to true. -
countDistinctBy
Count the distinct values of a given expression in this collectable. -
countDistinctBy
Count the distinct values of a given expression in this collectable, for which a predicate evaluates to true. -
mode
Get the mode, i.e. the value that appears most often in the collectable. -
modeBy
Get the mode, i.e. the value that appears most often in the collectable. -
modeAll
Get the mode, i.e. the values that appear most often in the collectable. -
modeAllBy
Get the mode, i.e. the values that appear most often in the collectable. -
sum
Get the sum of the elements in this collectable. -
sum
Get the sum of the elements in this collectable. -
sumInt
Get the sum of the elements in this collectable asint. -
sumLong
Get the sum of the elements in this collectable aslong. -
sumDouble
Get the sum of the elements in this collectable asdouble. -
avg
Get the average of the elements in this collectable. -
avg
Get the average of the elements in this collectable. -
avgInt
Get the average of the elements in this collectable asint. -
avgLong
Get the average of the elements in this collectable aslong. -
avgDouble
Get the average of the elements in this collectable asdouble. -
min
Get the minimum value.This makes the unsafe assumption that
<T extends Comparable<? super T>> -
min
Get the minimum value by a function. -
min
Get the minimum value by a function. -
min
Get the minimum value by a function. -
minBy
Get the minimum value by a function. -
minBy
Get the minimum value by a function. -
minAll
Get the minimum values.This makes the unsafe assumption that
<T extends Comparable<? super T>> -
minAll
Get the minimum values by a function. -
minAll
Get the minimum values by a function. -
minAll
Get the minimum values by a function. -
minAllBy
Get the minimum values by a function. -
minAllBy
Get the minimum values by a function. -
max
Get the maximum value.This makes the unsafe assumption that
<T extends Comparable<? super T>> -
max
Get the maximum value by a function. -
max
Get the maximum value by a function. -
max
Get the maximum value by a function. -
maxBy
Get the maximum value by a function. -
maxBy
Get the maximum value by a function. -
maxAll
Get the maximum values.This makes the unsafe assumption that
<T extends Comparable<? super T>> -
maxAll
Get the maximum values by a function. -
maxAll
Get the maximum values by a function. -
maxAll
Get the maximum values by a function. -
maxAllBy
Get the maximum values by a function. -
maxAllBy
Get the maximum values by a function. -
median
Get the median value.This makes the unsafe assumption that
<T extends Comparable<? super T>> -
median
Get the median value. -
medianBy
Get the median value by a function. -
medianBy
<U> Optional<T> medianBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Get the median value by a function. -
percentile
Get the discrete percentile value.This makes the unsafe assumption that
<T extends Comparable<? super T>> -
percentile
Get the discrete percentile value. -
percentileBy
<U extends Comparable<? super U>> Optional<T> percentileBy(double percentile, Function<? super T, ? extends U> function) Get the discrete percentile value by a function. -
percentileBy
<U> Optional<T> percentileBy(double percentile, Function<? super T, ? extends U> function, Comparator<? super U> comparator) Get the discrete percentile value by a function. -
allMatch
Whether all elements in the collectable match a given predicate. -
anyMatch
Whether any element in the collectable matches a given predicate. -
noneMatch
Whether no element in the collectable matches a given predicate. -
bitAnd
Collect all bits in this stream into a single value by applying bitwise and. -
bitAnd
Collect all bits in this stream into a single value by applying bitwise and. -
bitAndInt
Collect all bits in this stream into a single value by applying bitwise and. -
bitAndLong
Collect all bits in this stream into a single value by applying bitwise and. -
bitOr
Collect all bits in this stream into a single value by applying bitwise or. -
bitOr
Collect all bits in this stream into a single value by applying bitwise or. -
bitOrInt
Collect all bits in this stream into a single value by applying bitwise or. -
bitOrLong
Collect all bits in this stream into a single value by applying bitwise or. -
toList
Collect the collectable into anArrayList. -
toList
Collect the collectable into aList. -
toUnmodifiableList
Collect the collectable into an unmodifiableList. -
toSet
Collect the collectable into aLinkedHashSet. -
toSet
Collect the collectable into aSet. -
toUnmodifiableSet
Collect the collectable into an unmodifiableSet. -
toCollection
Collect the collectable into aCollection. -
toMap
<K,V> Map<K,V> toMap(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper) Collect the collectable into aMap. -
toMap
Collect the collectable into aMapwith the given keys and the self element as value. -
toString
Consume a stream and concatenate all elements using a separator. -
toString
Shortcut for callingStream.collect(Collector)with aCollectors.joining(CharSequence, CharSequence, CharSequence)collector. -
commonPrefix
String commonPrefix()Get the common prefix of all strings (or to-stringed values) in this stream. -
commonSuffix
String commonSuffix()Get the common prefix of all strings (or to-stringed values) in this stream.
-