| Constructor | Description |
|---|---|
Agg() |
| Modifier and Type | Method | Description |
|---|---|---|
static Collector<Boolean,?,Boolean> |
allMatch() |
Get a
Collector that calculates the ALL() function. |
static <T> Collector<T,?,Boolean> |
allMatch(Predicate<? super T> predicate) |
Get a
Collector that calculates the ALL() function. |
static Collector<Boolean,?,Boolean> |
anyMatch() |
Get a
Collector that calculates the ANY() function. |
static <T> Collector<T,?,Boolean> |
anyMatch(Predicate<? super T> predicate) |
Get a
Collector that calculates the ANY() function. |
static <T> Collector<T,?,Optional<T>> |
avg() |
|
static <T,U> Collector<T,?,Optional<U>> |
avg(Function<? super T,? extends U> function) |
|
static <T> Collector<T,?,Optional<T>> |
bitAnd() |
|
static <T,U> Collector<T,?,Optional<U>> |
bitAnd(Function<? super T,? extends U> function) |
|
static <T,U> Collector<T,?,Integer> |
bitAndInt(ToIntFunction<? super T> function) |
|
static <T,U> Collector<T,?,Long> |
bitAndLong(ToLongFunction<? super T> function) |
|
static <T> Collector<T,?,Optional<T>> |
bitOr() |
|
static <T,U> Collector<T,?,Optional<U>> |
bitOr(Function<? super T,? extends U> function) |
|
static <T,U> Collector<T,?,Integer> |
bitOrInt(ToIntFunction<? super T> function) |
|
static <T,U> Collector<T,?,Long> |
bitOrLong(ToLongFunction<? super T> function) |
|
static Collector<CharSequence,?,String> |
commonPrefix() |
Get a
Collector that calculates the common prefix of a set of strings. |
static Collector<CharSequence,?,String> |
commonSuffix() |
Get a
Collector that calculates the common suffix of a set of strings. |
static <T> Collector<T,?,Long> |
count() |
Get a
Collector that calculates the COUNT(*)
function. |
static <T> Collector<T,?,Long> |
countDistinct() |
Get a
Collector that calculates the
COUNT (DISTINCT *) function. |
static <T,U> Collector<T,?,Long> |
countDistinctBy(Function<? super T,? extends U> function) |
Get a
Collector that calculates the
COUNT (DISTINCT expr) function. |
static <T extends Comparable<? super T>> |
denseRank(T value) |
Get a
Collector that calculates the DENSE_RANK() function given natural ordering. |
static <T> Collector<T,?,Optional<Long>> |
denseRank(T value,
Comparator<? super T> comparator) |
Get a
Collector that calculates the DENSE_RANK() function given a specific ordering. |
static <T,U extends Comparable<? super U>> |
denseRankBy(U value,
Function<? super T,? extends U> function) |
Get a
Collector that calculates the derived DENSE_RANK() function given natural ordering. |
static <T,U> Collector<T,?,Optional<Long>> |
denseRankBy(U value,
Function<? super T,? extends U> function,
Comparator<? super U> comparator) |
Get a
Collector that calculates the derived DENSE_RANK() function given a specific ordering. |
static <T,A,R> Collector<T,?,R> |
filter(Predicate<? super T> predicate,
Collector<T,A,R> downstream) |
Get a
Collector that filters data passed to downstream collector. |
static <T> Collector<T,?,Optional<T>> |
first() |
Get a
Collector that calculates the FIRST function. |
static <T> Collector<T,?,Optional<T>> |
last() |
Get a
Collector that calculates the LAST function. |
static <T extends Comparable<? super T>> |
max() |
Get a
Collector that calculates the MAX() function. |
static <T> Collector<T,?,Optional<T>> |
max(Comparator<? super T> comparator) |
Get a
Collector that calculates the MAX() function. |
static <T,U extends Comparable<? super U>> |
max(Function<? super T,? extends U> function) |
Get a
Collector that calculates the MAX() function. |
static <T,U> Collector<T,?,Optional<U>> |
max(Function<? super T,? extends U> function,
Comparator<? super U> comparator) |
Get a
Collector that calculates the MAX() function. |
static <T extends Comparable<? super T>> |
maxAll() |
Get a
Collector that calculates the MAX() function, producing multiple results. |
static <T> Collector<T,?,Seq<T>> |
maxAll(Comparator<? super T> comparator) |
Get a
Collector that calculates the MAX() function, producing multiple results. |
static <T,U extends Comparable<? super U>> |
maxAll(Function<? super T,? extends U> function) |
Get a
Collector that calculates the MAX() function, producing multiple results. |
static <T,U> Collector<T,?,Seq<U>> |
maxAll(Function<? super T,? extends U> function,
Comparator<? super U> comparator) |
Get a
Collector that calculates the MAX() function, producing multiple results. |
static <T,U extends Comparable<? super U>> |
maxAllBy(Function<? super T,? extends U> function) |
Get a
Collector that calculates the MAX() function, producing multiple results. |
static <T,U> Collector<T,?,Seq<T>> |
maxAllBy(Function<? super T,? extends U> function,
Comparator<? super U> comparator) |
Get a
Collector that calculates the MAX() function, producing multiple results. |
static <T,U extends Comparable<? super U>> |
maxBy(Function<? super T,? extends U> function) |
Get a
Collector that calculates the MAX() function. |
static <T,U> Collector<T,?,Optional<T>> |
maxBy(Function<? super T,? extends U> function,
Comparator<? super U> comparator) |
Get a
Collector that calculates the MAX() function. |
static <T extends Comparable<? super T>> |
median() |
Get a
Collector that calculates the MEDIAN() function given natural ordering. |
static <T> Collector<T,?,Optional<T>> |
median(Comparator<? super T> comparator) |
Get a
Collector that calculates the MEDIAN() function given a specific ordering. |
static <T,U extends Comparable<? super U>> |
median(Function<? super T,? extends U> function) |
Get a
Collector that calculates the MEDIAN() function given a specific ordering. |
static <T,U> Collector<T,?,Optional<U>> |
median(Function<? super T,? extends U> function,
Comparator<? super U> comparator) |
Get a
Collector that calculates the MEDIAN() function given a specific ordering. |
static <T,U extends Comparable<? super U>> |
medianBy(Function<? super T,? extends U> function) |
Get a
Collector that calculates the derived MEDIAN() function given natural ordering. |
static <T,U> Collector<T,?,Optional<T>> |
medianBy(Function<? super T,? extends U> function,
Comparator<? super U> comparator) |
Get a
Collector that calculates the derived MEDIAN() function given a specific ordering. |
static <T extends Comparable<? super T>> |
min() |
Get a
Collector that calculates the MIN() function. |
static <T> Collector<T,?,Optional<T>> |
min(Comparator<? super T> comparator) |
Get a
Collector that calculates the MIN() function. |
static <T,U extends Comparable<? super U>> |
min(Function<? super T,? extends U> function) |
Get a
Collector that calculates the MIN() function. |
static <T,U> Collector<T,?,Optional<U>> |
min(Function<? super T,? extends U> function,
Comparator<? super U> comparator) |
Get a
Collector that calculates the MIN() function. |
static <T extends Comparable<? super T>> |
minAll() |
Get a
Collector that calculates the MIN() function, producing multiple results. |
static <T> Collector<T,?,Seq<T>> |
minAll(Comparator<? super T> comparator) |
Get a
Collector that calculates the MIN() function, producing multiple results. |
static <T,U extends Comparable<? super U>> |
minAll(Function<? super T,? extends U> function) |
Get a
Collector that calculates the MIN() function, producing multiple results. |
static <T,U> Collector<T,?,Seq<U>> |
minAll(Function<? super T,? extends U> function,
Comparator<? super U> comparator) |
Get a
Collector that calculates the MIN() function, producing multiple results. |
static <T,U extends Comparable<? super U>> |
minAllBy(Function<? super T,? extends U> function) |
Get a
Collector that calculates the MIN() function, producing multiple results. |
static <T,U> Collector<T,?,Seq<T>> |
minAllBy(Function<? super T,? extends U> function,
Comparator<? super U> comparator) |
Get a
Collector that calculates the MIN() function, producing multiple results. |
static <T,U extends Comparable<? super U>> |
minBy(Function<? super T,? extends U> function) |
Get a
Collector that calculates the MIN() function. |
static <T,U> Collector<T,?,Optional<T>> |
minBy(Function<? super T,? extends U> function,
Comparator<? super U> comparator) |
Get a
Collector that calculates the MIN() function. |
static <T> Collector<T,?,Optional<T>> |
mode() |
Get a
Collector that calculates the MODE() function. |
static <T> Collector<T,?,Seq<T>> |
modeAll() |
Get a
Collector that calculates the MODE() function. |
static <T,U> Collector<T,?,Seq<T>> |
modeAllBy(Function<? super T,? extends U> function) |
Get a
Collector that calculates the MODE() function. |
static <T,U> Collector<T,?,Optional<T>> |
modeBy(Function<? super T,? extends U> function) |
Get a
Collector that calculates the MODE() function. |
static Collector<Boolean,?,Boolean> |
noneMatch() |
Get a
Collector that calculates the NONE() function. |
static <T> Collector<T,?,Boolean> |
noneMatch(Predicate<? super T> predicate) |
Get a
Collector that calculates the NONE() function. |
static <T extends Comparable<? super T>> |
percentile(double percentile) |
Get a
Collector that calculates the PERCENTILE_DISC(percentile) function given natural ordering. |
static <T> Collector<T,?,Optional<T>> |
percentile(double percentile,
Comparator<? super T> comparator) |
Get a
Collector that calculates the PERCENTILE_DISC(percentile) function given a specific ordering. |
static <T,U extends Comparable<? super U>> |
percentile(double percentile,
Function<? super T,? extends U> function) |
Get a
Collector that calculates the PERCENTILE_DISC(percentile) function given a specific ordering. |
static <T,U> Collector<T,?,Optional<U>> |
percentile(double percentile,
Function<? super T,? extends U> function,
Comparator<? super U> comparator) |
Get a
Collector that calculates the PERCENTILE_DISC(percentile) function given a specific ordering. |
static <T,U extends Comparable<? super U>> |
percentileBy(double percentile,
Function<? super T,? extends U> function) |
Get a
Collector that calculates the derived PERCENTILE_DISC(percentile) function given natural ordering. |
static <T,U> Collector<T,?,Optional<T>> |
percentileBy(double percentile,
Function<? super T,? extends U> function,
Comparator<? super U> comparator) |
Get a
Collector that calculates the derived PERCENTILE_DISC(percentile) function given a specific ordering. |
static <T extends Comparable<? super T>> |
percentRank(T value) |
Get a
Collector that calculates the PERCENT_RANK() function given natural ordering. |
static <T> Collector<T,?,Optional<Double>> |
percentRank(T value,
Comparator<? super T> comparator) |
Get a
Collector that calculates the PERCENT_RANK() function given a specific ordering. |
static <T,U extends Comparable<? super U>> |
percentRankBy(U value,
Function<? super T,? extends U> function) |
Get a
Collector that calculates the derived PERCENT_RANK() function given natural ordering. |
static <T,U> Collector<T,?,Optional<Double>> |
percentRankBy(U value,
Function<? super T,? extends U> function,
Comparator<? super U> comparator) |
Get a
Collector that calculates the derived PERCENT_RANK() function given a specific ordering. |
static <T extends Comparable<? super T>> |
rank(T value) |
Get a
Collector that calculates the RANK() function given natural ordering. |
static <T> Collector<T,?,Optional<Long>> |
rank(T value,
Comparator<? super T> comparator) |
Get a
Collector that calculates the RANK() function given a specific ordering. |
static <T,U extends Comparable<? super U>> |
rankBy(U value,
Function<? super T,? extends U> function) |
Get a
Collector that calculates the derived RANK() function given natural ordering. |
static <T,U> Collector<T,?,Optional<Long>> |
rankBy(U value,
Function<? super T,? extends U> function,
Comparator<? super U> comparator) |
Get a
Collector that calculates the derived RANK() function given a specific ordering. |
static <T> Collector<T,?,Optional<T>> |
sum() |
|
static <T,U> Collector<T,?,Optional<U>> |
sum(Function<? super T,? extends U> function) |
public static <T,A,R> Collector<T,?,R> filter(Predicate<? super T> predicate, Collector<T,A,R> downstream)
Collector that filters data passed to downstream collector.public static <T> Collector<T,?,Optional<T>> first()
Collector that calculates the FIRST function.
Note that unlike in (Oracle) SQL, where the FIRST function
is an ordered set aggregate function that produces a set of results, this
collector just produces the first value in the order of stream traversal.
For matching behaviour to Oracle's [ aggregate function ] KEEP
(DENSE_RANK FIRST ORDER BY ... ), use maxAll(Comparator) instead.
public static <T> Collector<T,?,Optional<T>> last()
Collector that calculates the LAST function.
Note that unlike in (Oracle) SQL, where the FIRST function
is an ordered set aggregate function that produces a set of results, this
collector just produces the first value in the order of stream traversal.
For matching behaviour to Oracle's [ aggregate function ] KEEP
(DENSE_RANK LAST ORDER BY ... ), use minAll(Comparator) instead.
public static <T> Collector<T,?,Long> count()
Collector that calculates the COUNT(*)
function.public static <T> Collector<T,?,Long> countDistinct()
Collector that calculates the
COUNT (DISTINCT *) function.public static <T,U> Collector<T,?,Long> countDistinctBy(Function<? super T,? extends U> function)
Collector that calculates the
COUNT (DISTINCT expr) function.public static <T extends Comparable<? super T>> Collector<T,?,Optional<T>> min()
Collector that calculates the MIN() function.public static <T> Collector<T,?,Optional<T>> min(Comparator<? super T> comparator)
Collector that calculates the MIN() function.public static <T,U extends Comparable<? super U>> Collector<T,?,Optional<U>> min(Function<? super T,? extends U> function)
Collector that calculates the MIN() function.public static <T,U> Collector<T,?,Optional<U>> min(Function<? super T,? extends U> function, Comparator<? super U> comparator)
Collector that calculates the MIN() function.public static <T,U extends Comparable<? super U>> Collector<T,?,Optional<T>> minBy(Function<? super T,? extends U> function)
Collector that calculates the MIN() function.public static <T,U> Collector<T,?,Optional<T>> minBy(Function<? super T,? extends U> function, Comparator<? super U> comparator)
Collector that calculates the MIN() function.public static <T extends Comparable<? super T>> Collector<T,?,Seq<T>> minAll()
Collector that calculates the MIN() function, producing multiple results.public static <T> Collector<T,?,Seq<T>> minAll(Comparator<? super T> comparator)
Collector that calculates the MIN() function, producing multiple results.public static <T,U extends Comparable<? super U>> Collector<T,?,Seq<U>> minAll(Function<? super T,? extends U> function)
Collector that calculates the MIN() function, producing multiple results.public static <T,U> Collector<T,?,Seq<U>> minAll(Function<? super T,? extends U> function, Comparator<? super U> comparator)
Collector that calculates the MIN() function, producing multiple results.public static <T,U extends Comparable<? super U>> Collector<T,?,Seq<T>> minAllBy(Function<? super T,? extends U> function)
Collector that calculates the MIN() function, producing multiple results.public static <T,U> Collector<T,?,Seq<T>> minAllBy(Function<? super T,? extends U> function, Comparator<? super U> comparator)
Collector that calculates the MIN() function, producing multiple results.public static <T extends Comparable<? super T>> Collector<T,?,Optional<T>> max()
Collector that calculates the MAX() function.public static <T> Collector<T,?,Optional<T>> max(Comparator<? super T> comparator)
Collector that calculates the MAX() function.public static <T,U extends Comparable<? super U>> Collector<T,?,Optional<U>> max(Function<? super T,? extends U> function)
Collector that calculates the MAX() function.public static <T,U> Collector<T,?,Optional<U>> max(Function<? super T,? extends U> function, Comparator<? super U> comparator)
Collector that calculates the MAX() function.public static <T,U extends Comparable<? super U>> Collector<T,?,Optional<T>> maxBy(Function<? super T,? extends U> function)
Collector that calculates the MAX() function.public static <T,U> Collector<T,?,Optional<T>> maxBy(Function<? super T,? extends U> function, Comparator<? super U> comparator)
Collector that calculates the MAX() function.public static <T extends Comparable<? super T>> Collector<T,?,Seq<T>> maxAll()
Collector that calculates the MAX() function, producing multiple results.public static <T> Collector<T,?,Seq<T>> maxAll(Comparator<? super T> comparator)
Collector that calculates the MAX() function, producing multiple results.public static <T,U extends Comparable<? super U>> Collector<T,?,Seq<U>> maxAll(Function<? super T,? extends U> function)
Collector that calculates the MAX() function, producing multiple results.public static <T,U> Collector<T,?,Seq<U>> maxAll(Function<? super T,? extends U> function, Comparator<? super U> comparator)
Collector that calculates the MAX() function, producing multiple results.public static <T,U extends Comparable<? super U>> Collector<T,?,Seq<T>> maxAllBy(Function<? super T,? extends U> function)
Collector that calculates the MAX() function, producing multiple results.public static <T,U> Collector<T,?,Seq<T>> maxAllBy(Function<? super T,? extends U> function, Comparator<? super U> comparator)
Collector that calculates the MAX() function, producing multiple results.public static Collector<Boolean,?,Boolean> allMatch()
Collector that calculates the ALL() function.public static <T> Collector<T,?,Boolean> allMatch(Predicate<? super T> predicate)
Collector that calculates the ALL() function.public static Collector<Boolean,?,Boolean> anyMatch()
Collector that calculates the ANY() function.public static <T> Collector<T,?,Boolean> anyMatch(Predicate<? super T> predicate)
Collector that calculates the ANY() function.public static Collector<Boolean,?,Boolean> noneMatch()
Collector that calculates the NONE() function.public static <T> Collector<T,?,Boolean> noneMatch(Predicate<? super T> predicate)
Collector that calculates the NONE() function.public static <T,U> Collector<T,?,Optional<U>> bitAnd(Function<? super T,? extends U> function)
public static <T,U> Collector<T,?,Integer> bitAndInt(ToIntFunction<? super T> function)
public static <T,U> Collector<T,?,Long> bitAndLong(ToLongFunction<? super T> function)
public static <T,U> Collector<T,?,Optional<U>> bitOr(Function<? super T,? extends U> function)
public static <T,U> Collector<T,?,Integer> bitOrInt(ToIntFunction<? super T> function)
public static <T,U> Collector<T,?,Long> bitOrLong(ToLongFunction<? super T> function)
public static <T> Collector<T,?,Optional<T>> mode()
Collector that calculates the MODE() function.public static <T> Collector<T,?,Seq<T>> modeAll()
Collector that calculates the MODE() function.public static <T,U> Collector<T,?,Optional<T>> modeBy(Function<? super T,? extends U> function)
Collector that calculates the MODE() function.public static <T,U> Collector<T,?,Seq<T>> modeAllBy(Function<? super T,? extends U> function)
Collector that calculates the MODE() function.public static <T extends Comparable<? super T>> Collector<T,?,Optional<Long>> rank(T value)
Collector that calculates the RANK() function given natural ordering.public static <T> Collector<T,?,Optional<Long>> rank(T value, Comparator<? super T> comparator)
Collector that calculates the RANK() function given a specific ordering.public static <T,U extends Comparable<? super U>> Collector<T,?,Optional<Long>> rankBy(U value, Function<? super T,? extends U> function)
Collector that calculates the derived RANK() function given natural ordering.public static <T,U> Collector<T,?,Optional<Long>> rankBy(U value, Function<? super T,? extends U> function, Comparator<? super U> comparator)
Collector that calculates the derived RANK() function given a specific ordering.public static <T extends Comparable<? super T>> Collector<T,?,Optional<Long>> denseRank(T value)
Collector that calculates the DENSE_RANK() function given natural ordering.public static <T> Collector<T,?,Optional<Long>> denseRank(T value, Comparator<? super T> comparator)
Collector that calculates the DENSE_RANK() function given a specific ordering.public static <T,U extends Comparable<? super U>> Collector<T,?,Optional<Long>> denseRankBy(U value, Function<? super T,? extends U> function)
Collector that calculates the derived DENSE_RANK() function given natural ordering.public static <T,U> Collector<T,?,Optional<Long>> denseRankBy(U value, Function<? super T,? extends U> function, Comparator<? super U> comparator)
Collector that calculates the derived DENSE_RANK() function given a specific ordering.public static <T extends Comparable<? super T>> Collector<T,?,Optional<Double>> percentRank(T value)
Collector that calculates the PERCENT_RANK() function given natural ordering.public static <T> Collector<T,?,Optional<Double>> percentRank(T value, Comparator<? super T> comparator)
Collector that calculates the PERCENT_RANK() function given a specific ordering.public static <T,U extends Comparable<? super U>> Collector<T,?,Optional<Double>> percentRankBy(U value, Function<? super T,? extends U> function)
Collector that calculates the derived PERCENT_RANK() function given natural ordering.public static <T,U> Collector<T,?,Optional<Double>> percentRankBy(U value, Function<? super T,? extends U> function, Comparator<? super U> comparator)
Collector that calculates the derived PERCENT_RANK() function given a specific ordering.public static <T extends Comparable<? super T>> Collector<T,?,Optional<T>> median()
Collector that calculates the MEDIAN() function given natural ordering.public static <T> Collector<T,?,Optional<T>> median(Comparator<? super T> comparator)
Collector that calculates the MEDIAN() function given a specific ordering.public static <T,U extends Comparable<? super U>> Collector<T,?,Optional<U>> median(Function<? super T,? extends U> function)
Collector that calculates the MEDIAN() function given a specific ordering.public static <T,U> Collector<T,?,Optional<U>> median(Function<? super T,? extends U> function, Comparator<? super U> comparator)
Collector that calculates the MEDIAN() function given a specific ordering.public static <T,U extends Comparable<? super U>> Collector<T,?,Optional<T>> medianBy(Function<? super T,? extends U> function)
Collector that calculates the derived MEDIAN() function given natural ordering.public static <T,U> Collector<T,?,Optional<T>> medianBy(Function<? super T,? extends U> function, Comparator<? super U> comparator)
Collector that calculates the derived MEDIAN() function given a specific ordering.public static <T extends Comparable<? super T>> Collector<T,?,Optional<T>> percentile(double percentile)
Collector that calculates the PERCENTILE_DISC(percentile) function given natural ordering.public static <T> Collector<T,?,Optional<T>> percentile(double percentile, Comparator<? super T> comparator)
Collector that calculates the PERCENTILE_DISC(percentile) function given a specific ordering.public static <T,U extends Comparable<? super U>> Collector<T,?,Optional<U>> percentile(double percentile, Function<? super T,? extends U> function)
Collector that calculates the PERCENTILE_DISC(percentile) function given a specific ordering.public static <T,U> Collector<T,?,Optional<U>> percentile(double percentile, Function<? super T,? extends U> function, Comparator<? super U> comparator)
Collector that calculates the PERCENTILE_DISC(percentile) function given a specific ordering.public static <T,U extends Comparable<? super U>> Collector<T,?,Optional<T>> percentileBy(double percentile, Function<? super T,? extends U> function)
Collector that calculates the derived PERCENTILE_DISC(percentile) function given natural ordering.public static <T,U> Collector<T,?,Optional<T>> percentileBy(double percentile, Function<? super T,? extends U> function, Comparator<? super U> comparator)
Collector that calculates the derived PERCENTILE_DISC(percentile) function given a specific ordering.public static Collector<CharSequence,?,String> commonPrefix()
Collector that calculates the common prefix of a set of strings.public static Collector<CharSequence,?,String> commonSuffix()
Collector that calculates the common suffix of a set of strings.Copyright © 2018. All rights reserved.