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> UniConstraintCollector<A,?,Integer>` | `countDistinct(Function<A,?> groupValueMapping)`
    `static <A> UniConstraintCollector<A,?,Long>` | `countDistinctLong(Function<A,?> groupValueMapping)`
    `static <A> UniConstraintCollector<A,?,Long>` | `countLong()`
    `static <A,B> BiConstraintCollector<A,B,?,Long>` | `countLongBi()`
    `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> BiConstraintCollector<A,B,?,Integer>` | `sum(ToIntBiFunction<? super A,? super B> groupValueMapping)`
    `static <A> UniConstraintCollector<A,?,Integer>` | `sum(ToIntFunction<? super A> groupValueMapping)`
    `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> 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> 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> BiConstraintCollector<A,B,?,Long>` | `sumLong(ToLongBiFunction<? super A,? super B> groupValueMapping)`
    `static <A> UniConstraintCollector<A,?,Long>` | `sumLong(ToLongFunction<? super A> 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)`

    - ### 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()

    - #### countDistinct

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

    - #### countDistinctLong

          public static <A> UniConstraintCollector<A,?,Long> countDistinctLong(Function<A,?> 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)

    - #### 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)

    - #### 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)

    - #### 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–2019 JBoss by Red Hat. All rights reserved.