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,?,Long>` | `sumLong(ToLongBiFunction<? super A,? super B> groupValueMapping)`
    `static <A> UniConstraintCollector<A,?,Long>` | `sumLong(ToLongFunction<? super A> 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)

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

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