## Uses of Interface
org.optaplanner.core.api.score.stream.uni.UniConstraintCollector

- Packages that use UniConstraintCollector
  Package | Description
  --- | ---
  org.optaplanner.core.api.score.stream |
  org.optaplanner.core.api.score.stream.uni | The `ConstraintStream` API for uni-tuples.
  org.optaplanner.core.impl.score.stream.bavet.uni |
  org.optaplanner.core.impl.score.stream.drools.bi |
  org.optaplanner.core.impl.score.stream.drools.common |
  org.optaplanner.core.impl.score.stream.drools.quad |
  org.optaplanner.core.impl.score.stream.drools.tri |
  org.optaplanner.core.impl.score.stream.drools.uni |
  org.optaplanner.core.impl.score.stream.uni |

- - ### Uses of UniConstraintCollector in org.optaplanner.core.api.score.stream

    Methods in org.optaplanner.core.api.score.stream that return UniConstraintCollector
    Modifier and Type | Method | Description
    --- | --- | ---
    `static <A> UniConstraintCollector<A,​?,​Integer>` | ConstraintCollectors.`count()` | Returns a collector that counts the number of elements that are being grouped.
    `static <A> UniConstraintCollector<A,​?,​Integer>` | ConstraintCollectors.`countDistinct()` | As defined by `ConstraintCollectors.countDistinct(Function)`, with `Function.identity()` as the argument.
    `static <A> UniConstraintCollector<A,​?,​Integer>` | ConstraintCollectors.`countDistinct​(Function<A,​?> groupValueMapping)` | Returns a collector that counts the number of unique elements that are being grouped.
    `static <A> UniConstraintCollector<A,​?,​Long>` | ConstraintCollectors.`countDistinctLong​(Function<A,​?> groupValueMapping)` | As defined by `ConstraintCollectors.countDistinct(Function)`.
    `static <A> UniConstraintCollector<A,​?,​Long>` | ConstraintCollectors.`countLong()` | As defined by `ConstraintCollectors.count()`.
    `static <A extends Comparable<A>> UniConstraintCollector<A,​?,​A>` | ConstraintCollectors.`max()` | Returns a collector that finds a maximum value in a group of `Comparable` elements.
    `static <A> UniConstraintCollector<A,​?,​A>` | ConstraintCollectors.`max​(Comparator<A> comparator)` | As defined by `ConstraintCollectors.max()`, only with a custom `Comparator`.
    `static <A,​Mapped extends Comparable<Mapped>> UniConstraintCollector<A,​?,​Mapped>` | ConstraintCollectors.`max​(Function<A,​Mapped> groupValueMapping)` | Returns a collector that finds a maximum value in a group of `Comparable` elements.
    `static <A,​Mapped> UniConstraintCollector<A,​?,​Mapped>` | ConstraintCollectors.`max​(Function<A,​Mapped> groupValueMapping, Comparator<Mapped> comparator)` | As defined by `ConstraintCollectors.max(Function)`, only with a custom `Comparator`.
    `static <A extends Comparable<A>> UniConstraintCollector<A,​?,​A>` | ConstraintCollectors.`min()` | Returns a collector that finds a minimum value in a group of `Comparable` elements.
    `static <A> UniConstraintCollector<A,​?,​A>` | ConstraintCollectors.`min​(Comparator<A> comparator)` | As defined by `ConstraintCollectors.min()`, only with a custom `Comparator`.
    `static <A,​Mapped extends Comparable<Mapped>> UniConstraintCollector<A,​?,​Mapped>` | ConstraintCollectors.`min​(Function<A,​Mapped> groupValueMapping)` | Returns a collector that finds a minimum value in a group of `Comparable` elements.
    `static <A,​Mapped> UniConstraintCollector<A,​?,​Mapped>` | ConstraintCollectors.`min​(Function<A,​Mapped> groupValueMapping, Comparator<Mapped> comparator)` | As defined by `ConstraintCollectors.min(Function)`, only with a custom `Comparator`.
    `static <A,​Result> UniConstraintCollector<A,​?,​Result>` | ConstraintCollectors.`sum​(Function<? super A,​Result> groupValueMapping, Result zero, BinaryOperator<Result> adder, BinaryOperator<Result> subtractor)` | As defined by `ConstraintCollectors.sum(ToIntFunction)`.
    `static <A> UniConstraintCollector<A,​?,​Integer>` | ConstraintCollectors.`sum​(ToIntFunction<? super A> groupValueMapping)` | Returns a collector that sums an `int` property of the elements that are being grouped.
    `static <A> UniConstraintCollector<A,​?,​BigDecimal>` | ConstraintCollectors.`sumBigDecimal​(Function<? super A,​BigDecimal> groupValueMapping)` | As defined by `ConstraintCollectors.sum(ToIntFunction)`.
    `static <A> UniConstraintCollector<A,​?,​BigInteger>` | ConstraintCollectors.`sumBigInteger​(Function<? super A,​BigInteger> groupValueMapping)` | As defined by `ConstraintCollectors.sum(ToIntFunction)`.
    `static <A> UniConstraintCollector<A,​?,​Duration>` | ConstraintCollectors.`sumDuration​(Function<? super A,​Duration> groupValueMapping)` | As defined by `ConstraintCollectors.sum(ToIntFunction)`.
    `static <A> UniConstraintCollector<A,​?,​Long>` | ConstraintCollectors.`sumLong​(ToLongFunction<? super A> groupValueMapping)` | As defined by `ConstraintCollectors.sum(ToIntFunction)`.
    `static <A> UniConstraintCollector<A,​?,​Period>` | ConstraintCollectors.`sumPeriod​(Function<? super A,​Period> groupValueMapping)` | As defined by `ConstraintCollectors.sum(ToIntFunction)`.
    `static <A,​Mapped,​Result extends Collection<Mapped>> UniConstraintCollector<A,​?,​Result>` | ConstraintCollectors.`toCollection​(Function<A,​Mapped> groupValueMapping, IntFunction<Result> collectionFunction)` |
    `static <A,​Result extends Collection<A>> UniConstraintCollector<A,​?,​Result>` | ConstraintCollectors.`toCollection​(IntFunction<Result> collectionFunction)` |
    `static <A> UniConstraintCollector<A,​?,​List<A>>` | ConstraintCollectors.`toList()` | Creates constraint collector that returns `List` of the same element type as the `ConstraintStream`.
    `static <A,​Mapped> UniConstraintCollector<A,​?,​List<Mapped>>` | ConstraintCollectors.`toList​(Function<A,​Mapped> groupValueMapping)` | Creates constraint collector that returns `List` of the given element type.
    `static <A,​Key,​Value> UniConstraintCollector<A,​?,​Map<Key,​Set<Value>>>` | ConstraintCollectors.`toMap​(Function<? super A,​? extends Key> keyMapper, Function<? super A,​? extends Value> valueMapper)` | Creates a constraint collector that returns a `Map` with given keys and values consisting of a `Set` of mappings.
    `static <A,​Key,​Value> UniConstraintCollector<A,​?,​Map<Key,​Value>>` | ConstraintCollectors.`toMap​(Function<? super A,​? extends Key> keyMapper, Function<? super A,​? extends Value> valueMapper, BinaryOperator<Value> mergeFunction)` | Creates a constraint collector that returns a `Map`.
    `static <A,​Key,​Value,​ValueSet extends Set<Value>> UniConstraintCollector<A,​?,​Map<Key,​ValueSet>>` | ConstraintCollectors.`toMap​(Function<? super A,​? extends Key> keyMapper, Function<? super A,​? extends Value> valueMapper, IntFunction<ValueSet> valueSetFunction)` | Creates a constraint collector that returns a `Map` with given keys and values consisting of a `Set` of mappings.
    `static <A> UniConstraintCollector<A,​?,​Set<A>>` | ConstraintCollectors.`toSet()` | Creates constraint collector that returns `Set` of the same element type as the `ConstraintStream`.
    `static <A,​Mapped> UniConstraintCollector<A,​?,​Set<Mapped>>` | ConstraintCollectors.`toSet​(Function<A,​Mapped> groupValueMapping)` | Creates constraint collector that returns `Set` of the same element type as the `ConstraintStream`.
    `static <A,​Key extends Comparable<Key>,​Value> UniConstraintCollector<A,​?,​SortedMap<Key,​Set<Value>>>` | ConstraintCollectors.`toSortedMap​(Function<? super A,​? extends Key> keyMapper, Function<? super A,​? extends Value> valueMapper)` | Creates a constraint collector that returns a `SortedMap` with given keys and values consisting of a `Set` of mappings.
    `static <A,​Key extends Comparable<Key>,​Value> UniConstraintCollector<A,​?,​SortedMap<Key,​Value>>` | ConstraintCollectors.`toSortedMap​(Function<? super A,​? extends Key> keyMapper, Function<? super A,​? extends Value> valueMapper, BinaryOperator<Value> mergeFunction)` | Creates a constraint collector that returns a `SortedMap`.
    `static <A,​Key extends Comparable<Key>,​Value,​ValueSet extends Set<Value>> UniConstraintCollector<A,​?,​SortedMap<Key,​ValueSet>>` | ConstraintCollectors.`toSortedMap​(Function<? super A,​? extends Key> keyMapper, Function<? super A,​? extends Value> valueMapper, IntFunction<ValueSet> valueSetFunction)` | Creates a constraint collector that returns a `SortedMap` with given keys and values consisting of a `Set` of mappings.
    `static <A extends Comparable<A>> UniConstraintCollector<A,​?,​SortedSet<A>>` | ConstraintCollectors.`toSortedSet()` | Creates constraint collector that returns `SortedSet` of the same element type as the `ConstraintStream`.
    `static <A,​Mapped extends Comparable<Mapped>> UniConstraintCollector<A,​?,​SortedSet<Mapped>>` | ConstraintCollectors.`toSortedSet​(Function<A,​Mapped> groupValueMapping)` | Creates constraint collector that returns `SortedSet` of the same element type as the `ConstraintStream`.

  - ### Uses of UniConstraintCollector in org.optaplanner.core.api.score.stream.uni

    Methods in org.optaplanner.core.api.score.stream.uni with parameters of type UniConstraintCollector
    Modifier and Type | Method | Description
    --- | --- | ---
    `<GroupKey_,​ResultContainer_,​Result_> BiConstraintStream<GroupKey_,​Result_>` | UniConstraintStream.`groupBy​(Function<A,​GroupKey_> groupKeyMapping, UniConstraintCollector<A,​ResultContainer_,​Result_> collector)` | Convert the `UniConstraintStream` to a `BiConstraintStream`, consisting of unique tuples with two facts.
    `<GroupKeyA_,​GroupKeyB_,​ResultContainer_,​Result_> TriConstraintStream<GroupKeyA_,​GroupKeyB_,​Result_>` | UniConstraintStream.`groupBy​(Function<A,​GroupKeyA_> groupKeyAMapping, Function<A,​GroupKeyB_> groupKeyBMapping, UniConstraintCollector<A,​ResultContainer_,​Result_> collector)` | Combines the semantics of `UniConstraintStream.groupBy(Function, Function)` and `UniConstraintStream.groupBy(UniConstraintCollector)`.
    `<GroupKeyA_,​GroupKeyB_,​ResultContainerC_,​ResultC_,​ResultContainerD_,​ResultD_> QuadConstraintStream<GroupKeyA_,​GroupKeyB_,​ResultC_,​ResultD_>` | UniConstraintStream.`groupBy​(Function<A,​GroupKeyA_> groupKeyAMapping, Function<A,​GroupKeyB_> groupKeyBMapping, UniConstraintCollector<A,​ResultContainerC_,​ResultC_> collectorC, UniConstraintCollector<A,​ResultContainerD_,​ResultD_> collectorD)` | Combines the semantics of `UniConstraintStream.groupBy(Function, Function)` and `UniConstraintStream.groupBy(UniConstraintCollector)`.
    `<ResultContainer_,​Result_> UniConstraintStream<Result_>` | UniConstraintStream.`groupBy​(UniConstraintCollector<A,​ResultContainer_,​Result_> collector)` | Convert the `UniConstraintStream` to a different `UniConstraintStream`, containing only a single tuple, the result of applying `UniConstraintCollector`.

  - ### Uses of UniConstraintCollector in org.optaplanner.core.impl.score.stream.bavet.uni

    Methods in org.optaplanner.core.impl.score.stream.bavet.uni with parameters of type UniConstraintCollector
    Modifier and Type | Method | Description
    --- | --- | ---
    `<GroupKey_,​ResultContainer_,​Result_> BiConstraintStream<GroupKey_,​Result_>` | BavetAbstractUniConstraintStream.`groupBy​(Function<A,​GroupKey_> groupKeyMapping, UniConstraintCollector<A,​ResultContainer_,​Result_> collector)` |
    `<GroupKeyA_,​GroupKeyB_,​ResultContainer_,​Result_> TriConstraintStream<GroupKeyA_,​GroupKeyB_,​Result_>` | BavetAbstractUniConstraintStream.`groupBy​(Function<A,​GroupKeyA_> groupKeyAMapping, Function<A,​GroupKeyB_> groupKeyBMapping, UniConstraintCollector<A,​ResultContainer_,​Result_> collector)` |
    `<GroupKeyA_,​GroupKeyB_,​ResultContainerC_,​ResultC_,​ResultContainerD_,​ResultD_> QuadConstraintStream<GroupKeyA_,​GroupKeyB_,​ResultC_,​ResultD_>` | BavetAbstractUniConstraintStream.`groupBy​(Function<A,​GroupKeyA_> groupKeyAMapping, Function<A,​GroupKeyB_> groupKeyBMapping, UniConstraintCollector<A,​ResultContainerC_,​ResultC_> collectorC, UniConstraintCollector<A,​ResultContainerD_,​ResultD_> collectorD)` |
    `<ResultContainer_,​Result_> UniConstraintStream<Result_>` | BavetAbstractUniConstraintStream.`groupBy​(UniConstraintCollector<A,​ResultContainer_,​Result_> collector)` |

    Constructors in org.optaplanner.core.impl.score.stream.bavet.uni with parameters of type UniConstraintCollector
    Constructor | Description
    --- | ---
    `BavetGroupBridgeUniConstraintStream​(BavetConstraintFactory<Solution_> constraintFactory, BavetAbstractUniConstraintStream<Solution_,​A> parent, Function<A,​NewA> groupKeyMapping, UniConstraintCollector<A,​ResultContainer_,​NewB> collector)` |
    `BavetGroupBridgeUniNode​(BavetConstraintSession session, int nodeIndex, BavetAbstractUniNode<A> parentNode, Function<A,​NewA> groupKeyMapping, UniConstraintCollector<A,​ResultContainer_,​NewB> collector)` |

  - ### Uses of UniConstraintCollector in org.optaplanner.core.impl.score.stream.drools.bi

    Constructors in org.optaplanner.core.impl.score.stream.drools.bi with parameters of type UniConstraintCollector
    Constructor | Description
    --- | ---
    `DroolsGroupingBiConstraintStream​(DroolsConstraintFactory<Solution_> constraintFactory, DroolsAbstractUniConstraintStream<Solution_,​A> parent, Function<A,​NewA> groupKeyMapping, UniConstraintCollector<A,​__,​NewB> collector)` |

  - ### Uses of UniConstraintCollector in org.optaplanner.core.impl.score.stream.drools.common

    Methods in org.optaplanner.core.impl.score.stream.drools.common with parameters of type UniConstraintCollector
    Modifier and Type | Method | Description
    --- | --- | ---
    `<NewA,​NewB,​NewC> TriLeftHandSide<NewA,​NewB,​NewC>` | UniLeftHandSide.`andGroupBy​(Function<A,​NewA> keyMappingA, Function<A,​NewB> keyMappingB, UniConstraintCollector<A,​?,​NewC> collectorC)` |
    `<NewA,​NewB,​NewC,​NewD> QuadLeftHandSide<NewA,​NewB,​NewC,​NewD>` | UniLeftHandSide.`andGroupBy​(Function<A,​NewA> keyMappingA, Function<A,​NewB> keyMappingB, UniConstraintCollector<A,​?,​NewC> collectorC, UniConstraintCollector<A,​?,​NewD> collectorD)` |
    `<NewA,​NewB> BiLeftHandSide<NewA,​NewB>` | UniLeftHandSide.`andGroupBy​(Function<A,​NewA> keyMappingA, UniConstraintCollector<A,​?,​NewB> collectorB)` |
    `<NewA> UniLeftHandSide<NewA>` | UniLeftHandSide.`andGroupBy​(UniConstraintCollector<A,​?,​NewA> collector)` |

  - ### Uses of UniConstraintCollector in org.optaplanner.core.impl.score.stream.drools.quad

    Constructors in org.optaplanner.core.impl.score.stream.drools.quad with parameters of type UniConstraintCollector
    Constructor | Description
    --- | ---
    `DroolsGroupingQuadConstraintStream​(DroolsConstraintFactory<Solution_> constraintFactory, DroolsAbstractUniConstraintStream<Solution_,​A> parent, Function<A,​NewA> groupKeyAMapping, Function<A,​NewB> groupKeyBMapping, UniConstraintCollector<A,​ResultContainerC,​NewC> collectorC, UniConstraintCollector<A,​ResultContainerD,​NewD> collectorD)` |

  - ### Uses of UniConstraintCollector in org.optaplanner.core.impl.score.stream.drools.tri

    Constructors in org.optaplanner.core.impl.score.stream.drools.tri with parameters of type UniConstraintCollector
    Constructor | Description
    --- | ---
    `DroolsGroupingTriConstraintStream​(DroolsConstraintFactory<Solution_> constraintFactory, DroolsAbstractUniConstraintStream<Solution_,​A> parent, Function<A,​NewA> groupKeyAMapping, Function<A,​NewB> groupKeyBMapping, UniConstraintCollector<A,​ResultContainer_,​NewC> collector)` |

  - ### Uses of UniConstraintCollector in org.optaplanner.core.impl.score.stream.drools.uni

    Methods in org.optaplanner.core.impl.score.stream.drools.uni with parameters of type UniConstraintCollector
    Modifier and Type | Method | Description
    --- | --- | ---
    `<GroupKey_,​ResultContainer_,​Result_> BiConstraintStream<GroupKey_,​Result_>` | DroolsAbstractUniConstraintStream.`groupBy​(Function<A,​GroupKey_> groupKeyMapping, UniConstraintCollector<A,​ResultContainer_,​Result_> collector)` |
    `<GroupKeyA_,​GroupKeyB_,​ResultContainer_,​Result_> TriConstraintStream<GroupKeyA_,​GroupKeyB_,​Result_>` | DroolsAbstractUniConstraintStream.`groupBy​(Function<A,​GroupKeyA_> groupKeyAMapping, Function<A,​GroupKeyB_> groupKeyBMapping, UniConstraintCollector<A,​ResultContainer_,​Result_> collector)` |
    `<GroupKeyA_,​GroupKeyB_,​ResultContainerC_,​ResultC_,​ResultContainerD_,​ResultD_> QuadConstraintStream<GroupKeyA_,​GroupKeyB_,​ResultC_,​ResultD_>` | DroolsAbstractUniConstraintStream.`groupBy​(Function<A,​GroupKeyA_> groupKeyAMapping, Function<A,​GroupKeyB_> groupKeyBMapping, UniConstraintCollector<A,​ResultContainerC_,​ResultC_> collectorC, UniConstraintCollector<A,​ResultContainerD_,​ResultD_> collectorD)` |
    `<ResultContainer_,​Result_> UniConstraintStream<Result_>` | DroolsAbstractUniConstraintStream.`groupBy​(UniConstraintCollector<A,​ResultContainer_,​Result_> collector)` |

    Constructors in org.optaplanner.core.impl.score.stream.drools.uni with parameters of type UniConstraintCollector
    Constructor | Description
    --- | ---
    `DroolsGroupingUniConstraintStream​(DroolsConstraintFactory<Solution_> constraintFactory, DroolsAbstractUniConstraintStream<Solution_,​A> parent, UniConstraintCollector<A,​ResultContainer_,​NewA> collector)` |

  - ### Uses of UniConstraintCollector in org.optaplanner.core.impl.score.stream.uni

    Classes in org.optaplanner.core.impl.score.stream.uni that implement UniConstraintCollector
    Modifier and Type | Class | Description
    --- | --- | ---
    `class` | `DefaultUniConstraintCollector<A,​ResultContainer_,​Result_>` |