org.optaplanner.core.api.score.stream

## Class ConstraintCollectors

- java.lang.Object
- - org.optaplanner.core.api.score.stream.ConstraintCollectors

-     public final class ConstraintCollectors
      extends Object

  Creates an `UniConstraintCollector`, `BiConstraintCollector`, ... instance for use in `UniConstraintStream.groupBy(Function, UniConstraintCollector)`, ...

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <A> UniConstraintCollector<A,?,Integer>` | `count()`
    `static <A,B> BiConstraintCollector<A,B,?,Integer>` | `countBi()`
    `static <A,B> BiConstraintCollector<A,B,?,Integer>` | `countDistinct(BiFunction<A,B,?> groupValueMapping)`
    `static <A> UniConstraintCollector<A,?,Integer>` | `countDistinct(Function<A,?> groupValueMapping)`
    `static <A,B,C,D> QuadConstraintCollector<A,B,C,D,?,Integer>` | `countDistinct(QuadFunction<A,B,C,D,?> groupValueMapping)`
    `static <A,B,C> TriConstraintCollector<A,B,C,?,Integer>` | `countDistinct(TriFunction<A,B,C,?> groupValueMapping)`
    `static <A,B> BiConstraintCollector<A,B,?,Long>` | `countDistinctLong(BiFunction<A,B,?> groupValueMapping)`
    `static <A> UniConstraintCollector<A,?,Long>` | `countDistinctLong(Function<A,?> groupValueMapping)`
    `static <A,B,C,D> QuadConstraintCollector<A,B,C,D,?,Long>` | `countDistinctLong(QuadFunction<A,B,C,D,?> groupValueMapping)`
    `static <A,B,C> TriConstraintCollector<A,B,C,?,Long>` | `countDistinctLong(TriFunction<A,B,C,?> groupValueMapping)`
    `static <A> UniConstraintCollector<A,?,Long>` | `countLong()`
    `static <A,B> BiConstraintCollector<A,B,?,Long>` | `countLongBi()`
    `static <A,B,C,D> QuadConstraintCollector<A,B,C,D,?,Long>` | `countLongQuad()`
    `static <A,B,C> TriConstraintCollector<A,B,C,?,Long>` | `countLongTri()`
    `static <A,B,C,D> QuadConstraintCollector<A,B,C,D,?,Integer>` | `countQuad()`
    `static <A,B,C> TriConstraintCollector<A,B,C,?,Integer>` | `countTri()`
    `static <A extends Comparable<A>> UniConstraintCollector<A,?,A>` | `max()`
    `static <A> UniConstraintCollector<A,?,A>` | `max(Comparator<A> comparator)`
    `static <A extends Comparable<A>> UniConstraintCollector<A,?,A>` | `min()`
    `static <A> UniConstraintCollector<A,?,A>` | `min(Comparator<A> comparator)`
    `static <A,B,Result> BiConstraintCollector<A,B,?,Result>` | `sum(BiFunction<? super A,? super B,Result> groupValueMapping, Result zero, BinaryOperator<Result> adder, BinaryOperator<Result> subtractor)`
    `static <A,Result> UniConstraintCollector<A,?,Result>` | `sum(Function<? super A,Result> groupValueMapping, Result zero, BinaryOperator<Result> adder, BinaryOperator<Result> subtractor)`
    `static <A,B,C,D,Result> QuadConstraintCollector<A,B,C,D,?,Result>` | `sum(QuadFunction<? super A,? super B,? super C,? super D,Result> groupValueMapping, Result zero, BinaryOperator<Result> adder, BinaryOperator<Result> subtractor)`
    `static <A,B> BiConstraintCollector<A,B,?,Integer>` | `sum(ToIntBiFunction<? super A,? super B> groupValueMapping)`
    `static <A> UniConstraintCollector<A,?,Integer>` | `sum(ToIntFunction<? super A> groupValueMapping)`
    `static <A,B,C,D> QuadConstraintCollector<A,B,C,D,?,Integer>` | `sum(ToIntQuadFunction<? super A,? super B,? super C,? super D> groupValueMapping)`
    `static <A,B,C> TriConstraintCollector<A,B,C,?,Integer>` | `sum(ToIntTriFunction<? super A,? super B,? super C> groupValueMapping)`
    `static <A,B,C,Result> TriConstraintCollector<A,B,C,?,Result>` | `sum(TriFunction<? super A,? super B,? super C,Result> groupValueMapping, Result zero, BinaryOperator<Result> adder, BinaryOperator<Result> subtractor)`
    `static <A,B> BiConstraintCollector<A,B,?,BigDecimal>` | `sumBigDecimal(BiFunction<? super A,? super B,BigDecimal> groupValueMapping)`
    `static <A> UniConstraintCollector<A,?,BigDecimal>` | `sumBigDecimal(Function<? super A,BigDecimal> groupValueMapping)`
    `static <A,B,C,D> QuadConstraintCollector<A,B,C,D,?,BigDecimal>` | `sumBigDecimal(QuadFunction<? super A,? super B,? super C,? super D,BigDecimal> groupValueMapping)`
    `static <A,B,C> TriConstraintCollector<A,B,C,?,BigDecimal>` | `sumBigDecimal(TriFunction<? super A,? super B,? super C,BigDecimal> groupValueMapping)`
    `static <A,B> BiConstraintCollector<A,B,?,BigInteger>` | `sumBigInteger(BiFunction<? super A,? super B,BigInteger> groupValueMapping)`
    `static <A> UniConstraintCollector<A,?,BigInteger>` | `sumBigInteger(Function<? super A,BigInteger> groupValueMapping)`
    `static <A,B,C,D> QuadConstraintCollector<A,B,C,D,?,BigInteger>` | `sumBigInteger(QuadFunction<? super A,? super B,? super C,? super D,BigInteger> groupValueMapping)`
    `static <A,B,C> TriConstraintCollector<A,B,C,?,BigInteger>` | `sumBigInteger(TriFunction<? super A,? super B,? super C,BigInteger> groupValueMapping)`
    `static <A,B> BiConstraintCollector<A,B,?,Duration>` | `sumDuration(BiFunction<? super A,? super B,Duration> groupValueMapping)`
    `static <A> UniConstraintCollector<A,?,Duration>` | `sumDuration(Function<? super A,Duration> groupValueMapping)`
    `static <A,B,C,D> QuadConstraintCollector<A,B,C,D,?,Duration>` | `sumDuration(QuadFunction<? super A,? super B,? super C,? super D,Duration> groupValueMapping)`
    `static <A,B,C> TriConstraintCollector<A,B,C,?,Duration>` | `sumDuration(TriFunction<? super A,? super B,? super C,Duration> groupValueMapping)`
    `static <A,B> BiConstraintCollector<A,B,?,Long>` | `sumLong(ToLongBiFunction<? super A,? super B> groupValueMapping)`
    `static <A> UniConstraintCollector<A,?,Long>` | `sumLong(ToLongFunction<? super A> groupValueMapping)`
    `static <A,B,C,D> QuadConstraintCollector<A,B,C,D,?,Long>` | `sumLong(ToLongQuadFunction<? super A,? super B,? super C,? super D> groupValueMapping)`
    `static <A,B,C> TriConstraintCollector<A,B,C,?,Long>` | `sumLong(ToLongTriFunction<? super A,? super B,? super C> groupValueMapping)`
    `static <A,B> BiConstraintCollector<A,B,?,Period>` | `sumPeriod(BiFunction<? super A,? super B,Period> groupValueMapping)`
    `static <A> UniConstraintCollector<A,?,Period>` | `sumPeriod(Function<? super A,Period> groupValueMapping)`
    `static <A,B,C,D> QuadConstraintCollector<A,B,C,D,?,Period>` | `sumPeriod(QuadFunction<? super A,? super B,? super C,? super D,Period> groupValueMapping)`
    `static <A,B,C> TriConstraintCollector<A,B,C,?,Period>` | `sumPeriod(TriFunction<? super A,? super B,? super C,Period> groupValueMapping)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### count

          public static <A> UniConstraintCollector<A,?,Integer> count()

    - #### countLong

          public static <A> UniConstraintCollector<A,?,Long> countLong()

    - #### countBi

          public static <A,B> BiConstraintCollector<A,B,?,Integer> countBi()

    - #### countLongBi

          public static <A,B> BiConstraintCollector<A,B,?,Long> countLongBi()

    - #### countTri

          public static <A,B,C> TriConstraintCollector<A,B,C,?,Integer> countTri()

    - #### countLongTri

          public static <A,B,C> TriConstraintCollector<A,B,C,?,Long> countLongTri()

    - #### countQuad

          public static <A,B,C,D> QuadConstraintCollector<A,B,C,D,?,Integer> countQuad()

    - #### countLongQuad

          public static <A,B,C,D> QuadConstraintCollector<A,B,C,D,?,Long> countLongQuad()

    - #### countDistinct

          public static <A> UniConstraintCollector<A,?,Integer> countDistinct(Function<A,?> groupValueMapping)

    - #### countDistinctLong

          public static <A> UniConstraintCollector<A,?,Long> countDistinctLong(Function<A,?> groupValueMapping)

    - #### countDistinct

          public static <A,B> BiConstraintCollector<A,B,?,Integer> countDistinct(BiFunction<A,B,?> groupValueMapping)

    - #### countDistinctLong

          public static <A,B> BiConstraintCollector<A,B,?,Long> countDistinctLong(BiFunction<A,B,?> groupValueMapping)

    - #### countDistinct

          public static <A,B,C> TriConstraintCollector<A,B,C,?,Integer> countDistinct(TriFunction<A,B,C,?> groupValueMapping)

    - #### countDistinctLong

          public static <A,B,C> TriConstraintCollector<A,B,C,?,Long> countDistinctLong(TriFunction<A,B,C,?> groupValueMapping)

    - #### countDistinct

          public static <A,B,C,D> QuadConstraintCollector<A,B,C,D,?,Integer> countDistinct(QuadFunction<A,B,C,D,?> groupValueMapping)

    - #### countDistinctLong

          public static <A,B,C,D> QuadConstraintCollector<A,B,C,D,?,Long> countDistinctLong(QuadFunction<A,B,C,D,?> groupValueMapping)

    - #### sum

          public static <A> UniConstraintCollector<A,?,Integer> sum(ToIntFunction<? super A> groupValueMapping)

    - #### sumLong

          public static <A> UniConstraintCollector<A,?,Long> sumLong(ToLongFunction<? super A> groupValueMapping)

    - #### sum

          public static <A,Result> UniConstraintCollector<A,?,Result> sum(Function<? super A,Result> groupValueMapping,
                                                                          Result zero,
                                                                          BinaryOperator<Result> adder,
                                                                          BinaryOperator<Result> subtractor)

    - #### sumBigDecimal

          public static <A> UniConstraintCollector<A,?,BigDecimal> sumBigDecimal(Function<? super A,BigDecimal> groupValueMapping)

    - #### sumBigInteger

          public static <A> UniConstraintCollector<A,?,BigInteger> sumBigInteger(Function<? super A,BigInteger> groupValueMapping)

    - #### sumDuration

          public static <A> UniConstraintCollector<A,?,Duration> sumDuration(Function<? super A,Duration> groupValueMapping)

    - #### sumPeriod

          public static <A> UniConstraintCollector<A,?,Period> sumPeriod(Function<? super A,Period> groupValueMapping)

    - #### sum

          public static <A,B> BiConstraintCollector<A,B,?,Integer> sum(ToIntBiFunction<? super A,? super B> groupValueMapping)

    - #### sumLong

          public static <A,B> BiConstraintCollector<A,B,?,Long> sumLong(ToLongBiFunction<? super A,? super B> groupValueMapping)

    - #### sum

          public static <A,B,Result> BiConstraintCollector<A,B,?,Result> sum(BiFunction<? super A,? super B,Result> groupValueMapping,
                                                                             Result zero,
                                                                             BinaryOperator<Result> adder,
                                                                             BinaryOperator<Result> subtractor)

    - #### sumBigDecimal

          public static <A,B> BiConstraintCollector<A,B,?,BigDecimal> sumBigDecimal(BiFunction<? super A,? super B,BigDecimal> groupValueMapping)

    - #### sumBigInteger

          public static <A,B> BiConstraintCollector<A,B,?,BigInteger> sumBigInteger(BiFunction<? super A,? super B,BigInteger> groupValueMapping)

    - #### sumDuration

          public static <A,B> BiConstraintCollector<A,B,?,Duration> sumDuration(BiFunction<? super A,? super B,Duration> groupValueMapping)

    - #### sumPeriod

          public static <A,B> BiConstraintCollector<A,B,?,Period> sumPeriod(BiFunction<? super A,? super B,Period> groupValueMapping)

    - #### sum

          public static <A,B,C> TriConstraintCollector<A,B,C,?,Integer> sum(ToIntTriFunction<? super A,? super B,? super C> groupValueMapping)

    - #### sumLong

          public static <A,B,C> TriConstraintCollector<A,B,C,?,Long> sumLong(ToLongTriFunction<? super A,? super B,? super C> groupValueMapping)

    - #### sum

          public static <A,B,C,Result> TriConstraintCollector<A,B,C,?,Result> sum(TriFunction<? super A,? super B,? super C,Result> groupValueMapping,
                                                                                  Result zero,
                                                                                  BinaryOperator<Result> adder,
                                                                                  BinaryOperator<Result> subtractor)

    - #### sumBigDecimal

          public static <A,B,C> TriConstraintCollector<A,B,C,?,BigDecimal> sumBigDecimal(TriFunction<? super A,? super B,? super C,BigDecimal> groupValueMapping)

    - #### sumBigInteger

          public static <A,B,C> TriConstraintCollector<A,B,C,?,BigInteger> sumBigInteger(TriFunction<? super A,? super B,? super C,BigInteger> groupValueMapping)

    - #### sumDuration

          public static <A,B,C> TriConstraintCollector<A,B,C,?,Duration> sumDuration(TriFunction<? super A,? super B,? super C,Duration> groupValueMapping)

    - #### sumPeriod

          public static <A,B,C> TriConstraintCollector<A,B,C,?,Period> sumPeriod(TriFunction<? super A,? super B,? super C,Period> groupValueMapping)

    - #### sum

          public static <A,B,C,D> QuadConstraintCollector<A,B,C,D,?,Integer> sum(ToIntQuadFunction<? super A,? super B,? super C,? super D> groupValueMapping)

    - #### sumLong

          public static <A,B,C,D> QuadConstraintCollector<A,B,C,D,?,Long> sumLong(ToLongQuadFunction<? super A,? super B,? super C,? super D> groupValueMapping)

    - #### sum

          public static <A,B,C,D,Result> QuadConstraintCollector<A,B,C,D,?,Result> sum(QuadFunction<? super A,? super B,? super C,? super D,Result> groupValueMapping,
                                                                                       Result zero,
                                                                                       BinaryOperator<Result> adder,
                                                                                       BinaryOperator<Result> subtractor)

    - #### sumBigDecimal

          public static <A,B,C,D> QuadConstraintCollector<A,B,C,D,?,BigDecimal> sumBigDecimal(QuadFunction<? super A,? super B,? super C,? super D,BigDecimal> groupValueMapping)

    - #### sumBigInteger

          public static <A,B,C,D> QuadConstraintCollector<A,B,C,D,?,BigInteger> sumBigInteger(QuadFunction<? super A,? super B,? super C,? super D,BigInteger> groupValueMapping)

    - #### sumDuration

          public static <A,B,C,D> QuadConstraintCollector<A,B,C,D,?,Duration> sumDuration(QuadFunction<? super A,? super B,? super C,? super D,Duration> groupValueMapping)

    - #### sumPeriod

          public static <A,B,C,D> QuadConstraintCollector<A,B,C,D,?,Period> sumPeriod(QuadFunction<? super A,? super B,? super C,? super D,Period> groupValueMapping)

    - #### min

          public static <A> UniConstraintCollector<A,?,A> min(Comparator<A> comparator)

    - #### min

          public static <A extends Comparable<A>> UniConstraintCollector<A,?,A> min()

    - #### max

          public static <A> UniConstraintCollector<A,?,A> max(Comparator<A> comparator)

    - #### max

          public static <A extends Comparable<A>> UniConstraintCollector<A,?,A> max()

Copyright © 2006–2020 JBoss by Red Hat. All rights reserved.