Package org.optaplanner.core.api.score.stream.bi

## Interface BiConstraintStream<A,​B>

- Type Parameters:
    `A` - the type of the first fact in the tuple.
    `B` - the type of the second fact in the tuple.
  All Superinterfaces:
    `ConstraintStream`
  All Known Subinterfaces:
    `InnerBiConstraintStream<A,​B>`
  All Known Implementing Classes:
    `BavetAbstractBiConstraintStream`, `BavetFilterBiConstraintStream`, `BavetGroupBiConstraintStream`, `BavetGroupBridgeBiConstraintStream`, `BavetJoinBiConstraintStream`, `BavetJoinBridgeBiConstraintStream`, `BavetScoringBiConstraintStream`, `DroolsAbstractBiConstraintStream`, `DroolsExistsBiConstraintStream`, `DroolsFilterBiConstraintStream`, `DroolsGroupingBiConstraintStream`, `DroolsJoinBiConstraintStream`

      public interface BiConstraintStream<A,​B>
      extends ConstraintStream

  A `ConstraintStream` that matches two facts.
  See Also:
    `ConstraintStream`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `BiConstraintStream<A,​B>` | `filter​(BiPredicate<A,​B> predicate)` | Exhaustively test each tuple of facts against the `BiPredicate` and match if `BiPredicate.test(Object, Object)` returns true.
    `<GroupKey_> UniConstraintStream<GroupKey_>` | `groupBy​(BiFunction<A,​B,​GroupKey_> groupKeyMapping)` | Convert the `BiConstraintStream` to a `UniConstraintStream`, containing the set of tuples resulting from applying the group key mapping function on all tuples of the original stream.
    `<GroupKey_,​ResultContainer_,​Result_> BiConstraintStream<GroupKey_,​Result_>` | `groupBy​(BiFunction<A,​B,​GroupKey_> groupKeyMapping, BiConstraintCollector<A,​B,​ResultContainer_,​Result_> collector)` | Convert the `BiConstraintStream` to a different `BiConstraintStream`, consisting of unique tuples.
    `<GroupKey_,​ResultContainerB_,​ResultB_,​ResultContainerC_,​ResultC_> TriConstraintStream<GroupKey_,​ResultB_,​ResultC_>` | `groupBy​(BiFunction<A,​B,​GroupKey_> groupKeyMapping, BiConstraintCollector<A,​B,​ResultContainerB_,​ResultB_> collectorB, BiConstraintCollector<A,​B,​ResultContainerC_,​ResultC_> collectorC)` | Convert the `BiConstraintStream` to a `TriConstraintStream`, consisting of unique tuples with three facts.
    `<GroupKey_,​ResultContainerB_,​ResultB_,​ResultContainerC_,​ResultC_,​ResultContainerD_,​ResultD_> QuadConstraintStream<GroupKey_,​ResultB_,​ResultC_,​ResultD_>` | `groupBy​(BiFunction<A,​B,​GroupKey_> groupKeyMapping, BiConstraintCollector<A,​B,​ResultContainerB_,​ResultB_> collectorB, BiConstraintCollector<A,​B,​ResultContainerC_,​ResultC_> collectorC, BiConstraintCollector<A,​B,​ResultContainerD_,​ResultD_> collectorD)` | Convert the `BiConstraintStream` to a `QuadConstraintStream`, consisting of unique tuples with four facts.
    `<GroupKeyA_,​GroupKeyB_> BiConstraintStream<GroupKeyA_,​GroupKeyB_>` | `groupBy​(BiFunction<A,​B,​GroupKeyA_> groupKeyAMapping, BiFunction<A,​B,​GroupKeyB_> groupKeyBMapping)` | Convert the `BiConstraintStream` to a different `BiConstraintStream`, consisting of unique tuples.
    `<GroupKeyA_,​GroupKeyB_,​ResultContainer_,​Result_> TriConstraintStream<GroupKeyA_,​GroupKeyB_,​Result_>` | `groupBy​(BiFunction<A,​B,​GroupKeyA_> groupKeyAMapping, BiFunction<A,​B,​GroupKeyB_> groupKeyBMapping, BiConstraintCollector<A,​B,​ResultContainer_,​Result_> collector)` | Combines the semantics of `groupBy(BiFunction, BiFunction)` and `groupBy(BiConstraintCollector)`.
    `<GroupKeyA_,​GroupKeyB_,​ResultContainerC_,​ResultC_,​ResultContainerD_,​ResultD_> QuadConstraintStream<GroupKeyA_,​GroupKeyB_,​ResultC_,​ResultD_>` | `groupBy​(BiFunction<A,​B,​GroupKeyA_> groupKeyAMapping, BiFunction<A,​B,​GroupKeyB_> groupKeyBMapping, BiConstraintCollector<A,​B,​ResultContainerC_,​ResultC_> collectorC, BiConstraintCollector<A,​B,​ResultContainerD_,​ResultD_> collectorD)` | Combines the semantics of `groupBy(BiFunction, BiFunction)` and `groupBy(BiConstraintCollector)`.
    `<ResultContainer_,​Result_> UniConstraintStream<Result_>` | `groupBy​(BiConstraintCollector<A,​B,​ResultContainer_,​Result_> collector)` | Runs all tuples of the stream through a given @`BiConstraintCollector` and converts them into a new `UniConstraintStream` which only has a single tuple, the result of applying `BiConstraintCollector`.
    `<ResultContainerA_,​ResultA_,​ResultContainerB_,​ResultB_> BiConstraintStream<ResultA_,​ResultB_>` | `groupBy​(BiConstraintCollector<A,​B,​ResultContainerA_,​ResultA_> collectorA, BiConstraintCollector<A,​B,​ResultContainerB_,​ResultB_> collectorB)` | Convert the `BiConstraintStream` to a `BiConstraintStream`, containing only a single tuple, the result of applying two `BiConstraintCollector`s.
    `<ResultContainerA_,​ResultA_,​ResultContainerB_,​ResultB_,​ResultContainerC_,​ResultC_> TriConstraintStream<ResultA_,​ResultB_,​ResultC_>` | `groupBy​(BiConstraintCollector<A,​B,​ResultContainerA_,​ResultA_> collectorA, BiConstraintCollector<A,​B,​ResultContainerB_,​ResultB_> collectorB, BiConstraintCollector<A,​B,​ResultContainerC_,​ResultC_> collectorC)` | Convert the `BiConstraintStream` to a `TriConstraintStream`, containing only a single tuple, the result of applying three `BiConstraintCollector`s.
    `<ResultContainerA_,​ResultA_,​ResultContainerB_,​ResultB_,​ResultContainerC_,​ResultC_,​ResultContainerD_,​ResultD_> QuadConstraintStream<ResultA_,​ResultB_,​ResultC_,​ResultD_>` | `groupBy​(BiConstraintCollector<A,​B,​ResultContainerA_,​ResultA_> collectorA, BiConstraintCollector<A,​B,​ResultContainerB_,​ResultB_> collectorB, BiConstraintCollector<A,​B,​ResultContainerC_,​ResultC_> collectorC, BiConstraintCollector<A,​B,​ResultContainerD_,​ResultD_> collectorD)` | Convert the `BiConstraintStream` to a `QuadConstraintStream`, containing only a single tuple, the result of applying four `BiConstraintCollector`s.
    `default <C> BiConstraintStream<A,​B>` | `ifExists​(Class<C> otherClass, TriJoiner<A,​B,​C> joiner)` | Create a new `BiConstraintStream` for every pair of A and B where C exists for which the `TriJoiner` is true (for the properties it extracts from the facts).
    `<C> BiConstraintStream<A,​B>` | `ifExists​(Class<C> otherClass, TriJoiner<A,​B,​C>... joiners)` | As defined by `ifExists(Class, TriJoiner)`.
    `default <C> BiConstraintStream<A,​B>` | `ifExists​(Class<C> otherClass, TriJoiner<A,​B,​C> joiner1, TriJoiner<A,​B,​C> joiner2)` | As defined by `ifExists(Class, TriJoiner)`.
    `default <C> BiConstraintStream<A,​B>` | `ifExists​(Class<C> otherClass, TriJoiner<A,​B,​C> joiner1, TriJoiner<A,​B,​C> joiner2, TriJoiner<A,​B,​C> joiner3)` | As defined by `ifExists(Class, TriJoiner)`.
    `default <C> BiConstraintStream<A,​B>` | `ifExists​(Class<C> otherClass, TriJoiner<A,​B,​C> joiner1, TriJoiner<A,​B,​C> joiner2, TriJoiner<A,​B,​C> joiner3, TriJoiner<A,​B,​C> joiner4)` | As defined by `ifExists(Class, TriJoiner)`.
    `default <C> BiConstraintStream<A,​B>` | `ifNotExists​(Class<C> otherClass, TriJoiner<A,​B,​C> joiner)` | Create a new `BiConstraintStream` for every pair of A and B where C does not exist for which the `TriJoiner` is true (for the properties it extracts from the facts).
    `<C> BiConstraintStream<A,​B>` | `ifNotExists​(Class<C> otherClass, TriJoiner<A,​B,​C>... joiners)` | As defined by `ifNotExists(Class, TriJoiner)`.
    `default <C> BiConstraintStream<A,​B>` | `ifNotExists​(Class<C> otherClass, TriJoiner<A,​B,​C> joiner1, TriJoiner<A,​B,​C> joiner2)` | As defined by `ifNotExists(Class, TriJoiner)`.
    `default <C> BiConstraintStream<A,​B>` | `ifNotExists​(Class<C> otherClass, TriJoiner<A,​B,​C> joiner1, TriJoiner<A,​B,​C> joiner2, TriJoiner<A,​B,​C> joiner3)` | As defined by `ifNotExists(Class, TriJoiner)`.
    `default <C> BiConstraintStream<A,​B>` | `ifNotExists​(Class<C> otherClass, TriJoiner<A,​B,​C> joiner1, TriJoiner<A,​B,​C> joiner2, TriJoiner<A,​B,​C> joiner3, TriJoiner<A,​B,​C> joiner4)` | As defined by `ifNotExists(Class, TriJoiner)`.
    `Constraint` | `impact​(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntBiFunction<A,​B> matchWeigher)` | As defined by `impact(String, Score, ToIntBiFunction)`.
    `default Constraint` | `impact​(String constraintName, Score<?> constraintWeight, ToIntBiFunction<A,​B> matchWeigher)` | Positively or negatively impact the `Score` by the constraintWeight multiplied by the match weight.
    `Constraint` | `impactBigDecimal​(String constraintPackage, String constraintName, Score<?> constraintWeight, BiFunction<A,​B,​BigDecimal> matchWeigher)` | As defined by `impactBigDecimal(String, Score, BiFunction)`.
    `default Constraint` | `impactBigDecimal​(String constraintName, Score<?> constraintWeight, BiFunction<A,​B,​BigDecimal> matchWeigher)` | Positively or negatively impact the `Score` by the constraintWeight multiplied by the match weight.
    `Constraint` | `impactConfigurable​(String constraintPackage, String constraintName, ToIntBiFunction<A,​B> matchWeigher)` | As defined by `impactConfigurable(String, ToIntBiFunction)`.
    `default Constraint` | `impactConfigurable​(String constraintName, ToIntBiFunction<A,​B> matchWeigher)` | Positively or negatively impact the `Score` by the `ConstraintWeight` multiplied by the match weight.
    `Constraint` | `impactConfigurableBigDecimal​(String constraintPackage, String constraintName, BiFunction<A,​B,​BigDecimal> matchWeigher)` | As defined by `impactConfigurableBigDecimal(String, BiFunction)`.
    `default Constraint` | `impactConfigurableBigDecimal​(String constraintName, BiFunction<A,​B,​BigDecimal> matchWeigher)` | Positively or negatively impact the `Score` by the `ConstraintWeight` multiplied by the match weight.
    `Constraint` | `impactConfigurableLong​(String constraintPackage, String constraintName, ToLongBiFunction<A,​B> matchWeigher)` | As defined by `impactConfigurableLong(String, ToLongBiFunction)`.
    `default Constraint` | `impactConfigurableLong​(String constraintName, ToLongBiFunction<A,​B> matchWeigher)` | Positively or negatively impact the `Score` by the `ConstraintWeight` multiplied by the match weight.
    `Constraint` | `impactLong​(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongBiFunction<A,​B> matchWeigher)` | As defined by `impactLong(String, Score, ToLongBiFunction)`.
    `default Constraint` | `impactLong​(String constraintName, Score<?> constraintWeight, ToLongBiFunction<A,​B> matchWeigher)` | Positively or negatively impact the `Score` by the constraintWeight multiplied by the match weight.
    `default <C> TriConstraintStream<A,​B,​C>` | `join​(Class<C> otherClass)` | Create a new `TriConstraintStream` for every combination of [A, B] and C.
    `default <C> TriConstraintStream<A,​B,​C>` | `join​(Class<C> otherClass, TriJoiner<A,​B,​C> joiner)` | Create a new `TriConstraintStream` for every combination of [A, B] and C for which the `TriJoiner` is true (for the properties it extracts from both facts).
    `default <C> TriConstraintStream<A,​B,​C>` | `join​(Class<C> otherClass, TriJoiner<A,​B,​C>... joiners)` | As defined by `join(Class, TriJoiner)`.
    `default <C> TriConstraintStream<A,​B,​C>` | `join​(Class<C> otherClass, TriJoiner<A,​B,​C> joiner1, TriJoiner<A,​B,​C> joiner2)` | As defined by `join(Class, TriJoiner)`.
    `default <C> TriConstraintStream<A,​B,​C>` | `join​(Class<C> otherClass, TriJoiner<A,​B,​C> joiner1, TriJoiner<A,​B,​C> joiner2, TriJoiner<A,​B,​C> joiner3)` | As defined by `join(Class, TriJoiner)`.
    `default <C> TriConstraintStream<A,​B,​C>` | `join​(Class<C> otherClass, TriJoiner<A,​B,​C> joiner1, TriJoiner<A,​B,​C> joiner2, TriJoiner<A,​B,​C> joiner3, TriJoiner<A,​B,​C> joiner4)` | As defined by `join(Class, TriJoiner)`.
    `default <C> TriConstraintStream<A,​B,​C>` | `join​(UniConstraintStream<C> otherStream)` | Create a new `TriConstraintStream` for every combination of [A, B] and C.
    `<C> TriConstraintStream<A,​B,​C>` | `join​(UniConstraintStream<C> otherStream, TriJoiner<A,​B,​C> joiner)` | Create a new `TriConstraintStream` for every combination of [A, B] and C for which the `TriJoiner` is true (for the properties it extracts from both facts).
    `default <C> TriConstraintStream<A,​B,​C>` | `join​(UniConstraintStream<C> otherStream, TriJoiner<A,​B,​C>... joiners)` | As defined by `join(Class, TriJoiner)`.
    `default <C> TriConstraintStream<A,​B,​C>` | `join​(UniConstraintStream<C> otherStream, TriJoiner<A,​B,​C> joiner1, TriJoiner<A,​B,​C> joiner2)` | As defined by `join(Class, TriJoiner)`.
    `default <C> TriConstraintStream<A,​B,​C>` | `join​(UniConstraintStream<C> otherStream, TriJoiner<A,​B,​C> joiner1, TriJoiner<A,​B,​C> joiner2, TriJoiner<A,​B,​C> joiner3)` | As defined by `join(Class, TriJoiner)`.
    `default <C> TriConstraintStream<A,​B,​C>` | `join​(UniConstraintStream<C> otherStream, TriJoiner<A,​B,​C> joiner1, TriJoiner<A,​B,​C> joiner2, TriJoiner<A,​B,​C> joiner3, TriJoiner<A,​B,​C> joiner4)` | As defined by `join(Class, TriJoiner)`.
    `Constraint` | `penalize​(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntBiFunction<A,​B> matchWeigher)` | As defined by `penalize(String, Score, ToIntBiFunction)`.
    `default Constraint` | `penalize​(String constraintName, Score<?> constraintWeight, ToIntBiFunction<A,​B> matchWeigher)` | Negatively impact the `Score`: subtract the constraintWeight multiplied by the match weight.
    `Constraint` | `penalizeBigDecimal​(String constraintPackage, String constraintName, Score<?> constraintWeight, BiFunction<A,​B,​BigDecimal> matchWeigher)` | As defined by `penalizeBigDecimal(String, Score, BiFunction)`.
    `default Constraint` | `penalizeBigDecimal​(String constraintName, Score<?> constraintWeight, BiFunction<A,​B,​BigDecimal> matchWeigher)` | Negatively impact the `Score`: subtract the constraintWeight multiplied by the match weight.
    `Constraint` | `penalizeConfigurable​(String constraintPackage, String constraintName, ToIntBiFunction<A,​B> matchWeigher)` | As defined by `penalizeConfigurable(String, ToIntBiFunction)`.
    `default Constraint` | `penalizeConfigurable​(String constraintName, ToIntBiFunction<A,​B> matchWeigher)` | Negatively impact the `Score`: subtract the `ConstraintWeight` multiplied by the match weight.
    `Constraint` | `penalizeConfigurableBigDecimal​(String constraintPackage, String constraintName, BiFunction<A,​B,​BigDecimal> matchWeigher)` | As defined by `penalizeConfigurableBigDecimal(String, BiFunction)`.
    `default Constraint` | `penalizeConfigurableBigDecimal​(String constraintName, BiFunction<A,​B,​BigDecimal> matchWeigher)` | Negatively impact the `Score`: subtract the `ConstraintWeight` multiplied by the match weight.
    `Constraint` | `penalizeConfigurableLong​(String constraintPackage, String constraintName, ToLongBiFunction<A,​B> matchWeigher)` | As defined by `penalizeConfigurableLong(String, ToLongBiFunction)`.
    `default Constraint` | `penalizeConfigurableLong​(String constraintName, ToLongBiFunction<A,​B> matchWeigher)` | Negatively impact the `Score`: subtract the `ConstraintWeight` multiplied by the match weight.
    `Constraint` | `penalizeLong​(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongBiFunction<A,​B> matchWeigher)` | As defined by `penalizeLong(String, Score, ToLongBiFunction)`.
    `default Constraint` | `penalizeLong​(String constraintName, Score<?> constraintWeight, ToLongBiFunction<A,​B> matchWeigher)` | Negatively impact the `Score`: subtract the constraintWeight multiplied by the match weight.
    `Constraint` | `reward​(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntBiFunction<A,​B> matchWeigher)` | As defined by `reward(String, Score, ToIntBiFunction)`.
    `default Constraint` | `reward​(String constraintName, Score<?> constraintWeight, ToIntBiFunction<A,​B> matchWeigher)` | Positively impact the `Score`: add the constraintWeight multiplied by the match weight.
    `Constraint` | `rewardBigDecimal​(String constraintPackage, String constraintName, Score<?> constraintWeight, BiFunction<A,​B,​BigDecimal> matchWeigher)` | As defined by `rewardBigDecimal(String, Score, BiFunction)`.
    `default Constraint` | `rewardBigDecimal​(String constraintName, Score<?> constraintWeight, BiFunction<A,​B,​BigDecimal> matchWeigher)` | Positively impact the `Score`: add the constraintWeight multiplied by the match weight.
    `Constraint` | `rewardConfigurable​(String constraintPackage, String constraintName, ToIntBiFunction<A,​B> matchWeigher)` | As defined by `rewardConfigurable(String, ToIntBiFunction)`.
    `default Constraint` | `rewardConfigurable​(String constraintName, ToIntBiFunction<A,​B> matchWeigher)` | Positively impact the `Score`: add the `ConstraintWeight` multiplied by the match weight.
    `Constraint` | `rewardConfigurableBigDecimal​(String constraintPackage, String constraintName, BiFunction<A,​B,​BigDecimal> matchWeigher)` | As defined by `rewardConfigurableBigDecimal(String, BiFunction)`.
    `default Constraint` | `rewardConfigurableBigDecimal​(String constraintName, BiFunction<A,​B,​BigDecimal> matchWeigher)` | Positively impact the `Score`: add the `ConstraintWeight` multiplied by the match weight.
    `Constraint` | `rewardConfigurableLong​(String constraintPackage, String constraintName, ToLongBiFunction<A,​B> matchWeigher)` | As defined by `rewardConfigurableLong(String, ToLongBiFunction)`.
    `default Constraint` | `rewardConfigurableLong​(String constraintName, ToLongBiFunction<A,​B> matchWeigher)` | Positively impact the `Score`: add the `ConstraintWeight` multiplied by the match weight.
    `Constraint` | `rewardLong​(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongBiFunction<A,​B> matchWeigher)` | As defined by `rewardLong(String, Score, ToLongBiFunction)`.
    `default Constraint` | `rewardLong​(String constraintName, Score<?> constraintWeight, ToLongBiFunction<A,​B> matchWeigher)` | Positively impact the `Score`: add the constraintWeight multiplied by the match weight.

    - ### Methods inherited from interface org.optaplanner.core.api.score.stream.ConstraintStream

      `getConstraintFactory, impact, impact, penalize, penalize, penalizeConfigurable, penalizeConfigurable, reward, reward, rewardConfigurable, rewardConfigurable`

- - ### Method Detail

    - #### filter

          BiConstraintStream<A,​B> filter​(BiPredicate<A,​B> predicate)

      Exhaustively test each tuple of facts against the `BiPredicate` and match if `BiPredicate.test(Object, Object)` returns true.

      Important: This is slower and less scalable than `UniConstraintStream.join(UniConstraintStream, BiJoiner)` with a proper `BiJoiner` predicate (such as `Joiners.equal(Function, Function)`, because the latter applies hashing and/or indexing, so it doesn't create every combination just to filter it out.

      Parameters:
        `predicate` - never null
      Returns:
        never null

    - #### join

          default <C> TriConstraintStream<A,​B,​C> join​(UniConstraintStream<C> otherStream)

      Create a new `TriConstraintStream` for every combination of [A, B] and C.

      Important: `TriConstraintStream.filter(TriPredicate)` Filtering} this is slower and less scalable than a `join(UniConstraintStream, TriJoiner)`, because it doesn't apply hashing and/or indexing on the properties, so it creates and checks every combination of [A, B] and C.

      Type Parameters:
        `C` - the type of the third matched fact
      Parameters:
        `otherStream` - never null
      Returns:
        never null, a stream that matches every combination of [A, B] and C

    - #### join

          <C> TriConstraintStream<A,​B,​C> join​(UniConstraintStream<C> otherStream,
                                                          TriJoiner<A,​B,​C> joiner)

      Create a new `TriConstraintStream` for every combination of [A, B] and C for which the `TriJoiner` is true (for the properties it extracts from both facts).

      Important: This is faster and more scalable than a `join` followed by a `filter`, because it applies hashing and/or indexing on the properties, so it doesn't create nor checks every combination of [A, B] and C.

      Type Parameters:
        `C` - the type of the third matched fact
      Parameters:
        `otherStream` - never null
        `joiner` - never null
      Returns:
        never null, a stream that matches every combination of [A, B] and C for which the `TriFunction` is true

    - #### join

          default <C> TriConstraintStream<A,​B,​C> join​(UniConstraintStream<C> otherStream,
                                                                  TriJoiner<A,​B,​C> joiner1,
                                                                  TriJoiner<A,​B,​C> joiner2)

      As defined by `join(Class, TriJoiner)`.
      Type Parameters:
        `C` - the type of the third matched fact
      Parameters:
        `otherStream` - never null
        `joiner1` - never null
        `joiner2` - never null
      Returns:
        never null, a stream that matches every combination of [A, B] and C for which all the `joiners` are true

    - #### join

          default <C> TriConstraintStream<A,​B,​C> join​(UniConstraintStream<C> otherStream,
                                                                  TriJoiner<A,​B,​C> joiner1,
                                                                  TriJoiner<A,​B,​C> joiner2,
                                                                  TriJoiner<A,​B,​C> joiner3)

      As defined by `join(Class, TriJoiner)`.
      Type Parameters:
        `C` - the type of the third matched fact
      Parameters:
        `otherStream` - never null
        `joiner1` - never null
        `joiner2` - never null
        `joiner3` - never null
      Returns:
        never null, a stream that matches every combination of [A, B] and C for which all the `joiners` are true

    - #### join

          default <C> TriConstraintStream<A,​B,​C> join​(UniConstraintStream<C> otherStream,
                                                                  TriJoiner<A,​B,​C> joiner1,
                                                                  TriJoiner<A,​B,​C> joiner2,
                                                                  TriJoiner<A,​B,​C> joiner3,
                                                                  TriJoiner<A,​B,​C> joiner4)

      As defined by `join(Class, TriJoiner)`.
      Type Parameters:
        `C` - the type of the third matched fact
      Parameters:
        `otherStream` - never null
        `joiner1` - never null
        `joiner2` - never null
        `joiner3` - never null
        `joiner4` - never null
      Returns:
        never null, a stream that matches every combination of [A, B] and C for which all the `joiners` are true

    - #### join

          default <C> TriConstraintStream<A,​B,​C> join​(UniConstraintStream<C> otherStream,
                                                                  TriJoiner<A,​B,​C>... joiners)

      As defined by `join(Class, TriJoiner)`.

      This method causes Unchecked generics array creation for varargs parameter warnings, but we can't fix it with a `SafeVarargs` annotation because it's an interface method. Therefore, there are overloaded methods with up to 4 `BiJoiner` parameters.

      Type Parameters:
        `C` - the type of the third matched fact
      Parameters:
        `otherStream` - never null
        `joiners` - never null
      Returns:
        never null, a stream that matches every combination of [A, B] and C for which all the `joiners` are true

    - #### join

          default <C> TriConstraintStream<A,​B,​C> join​(Class<C> otherClass)

      Create a new `TriConstraintStream` for every combination of [A, B] and C.

      Important: `TriConstraintStream.filter(TriPredicate)` Filtering} this is slower and less scalable than a `join(Class, TriJoiner)`, because it doesn't apply hashing and/or indexing on the properties, so it creates and checks every combination of [A, B] and C.

      This method is syntactic sugar for `join(UniConstraintStream)`.

      Type Parameters:
        `C` - the type of the third matched fact
      Parameters:
        `otherClass` - never null
      Returns:
        never null, a stream that matches every combination of [A, B] and C

    - #### join

          default <C> TriConstraintStream<A,​B,​C> join​(Class<C> otherClass,
                                                                  TriJoiner<A,​B,​C> joiner)

      Create a new `TriConstraintStream` for every combination of [A, B] and C for which the `TriJoiner` is true (for the properties it extracts from both facts).

      Important: This is faster and more scalable than a `join` followed by a `filter`, because it applies hashing and/or indexing on the properties, so it doesn't create nor checks every combination of [A, B] and C.

      This method is syntactic sugar for `join(UniConstraintStream, TriJoiner)`.

      This method has overloaded methods with multiple `TriJoiner` parameters.

      Type Parameters:
        `C` - the type of the third matched fact
      Parameters:
        `otherClass` - never null
        `joiner` - never null
      Returns:
        never null, a stream that matches every combination of [A, B] and C for which the `TriJoiner` is true

    - #### join

          default <C> TriConstraintStream<A,​B,​C> join​(Class<C> otherClass,
                                                                  TriJoiner<A,​B,​C> joiner1,
                                                                  TriJoiner<A,​B,​C> joiner2)

      As defined by `join(Class, TriJoiner)`.
      Type Parameters:
        `C` - the type of the third matched fact
      Parameters:
        `otherClass` - never null
        `joiner1` - never null
        `joiner2` - never null
      Returns:
        never null, a stream that matches every combination of [A, B] and C for which all the `joiners` are true

    - #### join

          default <C> TriConstraintStream<A,​B,​C> join​(Class<C> otherClass,
                                                                  TriJoiner<A,​B,​C> joiner1,
                                                                  TriJoiner<A,​B,​C> joiner2,
                                                                  TriJoiner<A,​B,​C> joiner3)

      As defined by `join(Class, TriJoiner)`.
      Type Parameters:
        `C` - the type of the third matched fact
      Parameters:
        `otherClass` - never null
        `joiner1` - never null
        `joiner2` - never null
        `joiner3` - never null
      Returns:
        never null, a stream that matches every combination of [A, B] and C for which all the `joiners` are true

    - #### join

          default <C> TriConstraintStream<A,​B,​C> join​(Class<C> otherClass,
                                                                  TriJoiner<A,​B,​C> joiner1,
                                                                  TriJoiner<A,​B,​C> joiner2,
                                                                  TriJoiner<A,​B,​C> joiner3,
                                                                  TriJoiner<A,​B,​C> joiner4)

      As defined by `join(Class, TriJoiner)`.
      Type Parameters:
        `C` - the type of the third matched fact
      Parameters:
        `otherClass` - never null
        `joiner1` - never null
        `joiner2` - never null
        `joiner3` - never null
        `joiner4` - never null
      Returns:
        never null, a stream that matches every combination of [A, B] and C for which all the `joiners` are true

    - #### join

          default <C> TriConstraintStream<A,​B,​C> join​(Class<C> otherClass,
                                                                  TriJoiner<A,​B,​C>... joiners)

      As defined by `join(Class, TriJoiner)`.

      This method causes Unchecked generics array creation for varargs parameter warnings, but we can't fix it with a `SafeVarargs` annotation because it's an interface method. Therefore, there are overloaded methods with up to 4 `BiJoiner` parameters.

      Type Parameters:
        `C` - the type of the third matched fact
      Parameters:
        `otherClass` - never null
        `joiners` - never null
      Returns:
        never null, a stream that matches every combination of [A, B] and C for which all the `joiners` are true

    - #### ifExists

          default <C> BiConstraintStream<A,​B> ifExists​(Class<C> otherClass,
                                                             TriJoiner<A,​B,​C> joiner)

      Create a new `BiConstraintStream` for every pair of A and B where C exists for which the `TriJoiner` is true (for the properties it extracts from the facts).

      This method has overloaded methods with multiple `TriJoiner` parameters.

      Type Parameters:
        `C` - the type of the third matched fact
      Parameters:
        `otherClass` - never null
        `joiner` - never null
      Returns:
        never null, a stream that matches every pair of A and B where C exists for which the `TriJoiner` is true

    - #### ifExists

          default <C> BiConstraintStream<A,​B> ifExists​(Class<C> otherClass,
                                                             TriJoiner<A,​B,​C> joiner1,
                                                             TriJoiner<A,​B,​C> joiner2)

      As defined by `ifExists(Class, TriJoiner)`. For performance reasons, indexing joiners must be placed before filtering joiners.
      Type Parameters:
        `C` - the type of the third matched fact
      Parameters:
        `otherClass` - never null
        `joiner1` - never null
        `joiner2` - never null
      Returns:
        never null, a stream that matches every pair of A and B where C exists for which the `TriJoiner`s are true

    - #### ifExists

          default <C> BiConstraintStream<A,​B> ifExists​(Class<C> otherClass,
                                                             TriJoiner<A,​B,​C> joiner1,
                                                             TriJoiner<A,​B,​C> joiner2,
                                                             TriJoiner<A,​B,​C> joiner3)

      As defined by `ifExists(Class, TriJoiner)`. For performance reasons, indexing joiners must be placed before filtering joiners.
      Type Parameters:
        `C` - the type of the third matched fact
      Parameters:
        `otherClass` - never null
        `joiner1` - never null
        `joiner2` - never null
        `joiner3` - never null
      Returns:
        never null, a stream that matches every pair of A and B where C exists for which the `TriJoiner`s are true

    - #### ifExists

          default <C> BiConstraintStream<A,​B> ifExists​(Class<C> otherClass,
                                                             TriJoiner<A,​B,​C> joiner1,
                                                             TriJoiner<A,​B,​C> joiner2,
                                                             TriJoiner<A,​B,​C> joiner3,
                                                             TriJoiner<A,​B,​C> joiner4)

      As defined by `ifExists(Class, TriJoiner)`. For performance reasons, indexing joiners must be placed before filtering joiners.
      Type Parameters:
        `C` - the type of the third matched fact
      Parameters:
        `otherClass` - never null
        `joiner1` - never null
        `joiner2` - never null
        `joiner3` - never null
        `joiner4` - never null
      Returns:
        never null, a stream that matches every pair of A and B where C exists for which the `TriJoiner`s are true

    - #### ifExists

          <C> BiConstraintStream<A,​B> ifExists​(Class<C> otherClass,
                                                     TriJoiner<A,​B,​C>... joiners)

      As defined by `ifExists(Class, TriJoiner)`. For performance reasons, indexing joiners must be placed before filtering joiners.

      This method causes Unchecked generics array creation for varargs parameter warnings, but we can't fix it with a `SafeVarargs` annotation because it's an interface method. Therefore, there are overloaded methods with up to 4 `TriJoiner` parameters.

      Type Parameters:
        `C` - the type of the third matched fact
      Parameters:
        `otherClass` - never null
        `joiners` - never null
      Returns:
        never null, a stream that matches every pair of A and B where C exists for which the `TriJoiner`s are true

    - #### ifNotExists

          default <C> BiConstraintStream<A,​B> ifNotExists​(Class<C> otherClass,
                                                                TriJoiner<A,​B,​C> joiner)

      Create a new `BiConstraintStream` for every pair of A and B where C does not exist for which the `TriJoiner` is true (for the properties it extracts from the facts).

      This method has overloaded methods with multiple `TriJoiner` parameters.

      Type Parameters:
        `C` - the type of the third matched fact
      Parameters:
        `otherClass` - never null
        `joiner` - never null
      Returns:
        never null, a stream that matches every pair of A and B where C does not exist for which the `TriJoiner` is true

    - #### ifNotExists

          default <C> BiConstraintStream<A,​B> ifNotExists​(Class<C> otherClass,
                                                                TriJoiner<A,​B,​C> joiner1,
                                                                TriJoiner<A,​B,​C> joiner2)

      As defined by `ifNotExists(Class, TriJoiner)`. For performance reasons, indexing joiners must be placed before filtering joiners.
      Type Parameters:
        `C` - the type of the third matched fact
      Parameters:
        `otherClass` - never null
        `joiner1` - never null
        `joiner2` - never null
      Returns:
        never null, a stream that matches every pair of A and B where C does not exist for which the `TriJoiner`s are true

    - #### ifNotExists

          default <C> BiConstraintStream<A,​B> ifNotExists​(Class<C> otherClass,
                                                                TriJoiner<A,​B,​C> joiner1,
                                                                TriJoiner<A,​B,​C> joiner2,
                                                                TriJoiner<A,​B,​C> joiner3)

      As defined by `ifNotExists(Class, TriJoiner)`. For performance reasons, indexing joiners must be placed before filtering joiners.
      Type Parameters:
        `C` - the type of the third matched fact
      Parameters:
        `otherClass` - never null
        `joiner1` - never null
        `joiner2` - never null
        `joiner3` - never null
      Returns:
        never null, a stream that matches every pair of A and B where C does not exist for which the `TriJoiner`s are true

    - #### ifNotExists

          default <C> BiConstraintStream<A,​B> ifNotExists​(Class<C> otherClass,
                                                                TriJoiner<A,​B,​C> joiner1,
                                                                TriJoiner<A,​B,​C> joiner2,
                                                                TriJoiner<A,​B,​C> joiner3,
                                                                TriJoiner<A,​B,​C> joiner4)

      As defined by `ifNotExists(Class, TriJoiner)`. For performance reasons, indexing joiners must be placed before filtering joiners.
      Type Parameters:
        `C` - the type of the third matched fact
      Parameters:
        `otherClass` - never null
        `joiner1` - never null
        `joiner2` - never null
        `joiner3` - never null
        `joiner4` - never null
      Returns:
        never null, a stream that matches every pair of A and B where C does not exist for which the `TriJoiner`s are true

    - #### ifNotExists

          <C> BiConstraintStream<A,​B> ifNotExists​(Class<C> otherClass,
                                                        TriJoiner<A,​B,​C>... joiners)

      As defined by `ifNotExists(Class, TriJoiner)`. For performance reasons, indexing joiners must be placed before filtering joiners.

      This method causes Unchecked generics array creation for varargs parameter warnings, but we can't fix it with a `SafeVarargs` annotation because it's an interface method. Therefore, there are overloaded methods with up to 4 `TriJoiner` parameters.

      Type Parameters:
        `C` - the type of the third matched fact
      Parameters:
        `otherClass` - never null
        `joiners` - never null
      Returns:
        never null, a stream that matches every pair of A and B where C does not exist for which the `TriJoiner`s are true

    - #### groupBy

          <ResultContainer_,​Result_> UniConstraintStream<Result_> groupBy​(BiConstraintCollector<A,​B,​ResultContainer_,​Result_> collector)

      Runs all tuples of the stream through a given @`BiConstraintCollector` and converts them into a new `UniConstraintStream` which only has a single tuple, the result of applying `BiConstraintCollector`.
      Type Parameters:
        `ResultContainer_` - the mutable accumulation type (often hidden as an implementation detail)
        `Result_` - the type of a fact in the destination `UniConstraintStream`'s tuple
      Parameters:
        `collector` - never null, the collector to perform the grouping operation with See `ConstraintCollectors` for common operations, such as `count()`, `sum()` and others.
      Returns:
        never null

    - #### groupBy

          <ResultContainerA_,​ResultA_,​ResultContainerB_,​ResultB_> BiConstraintStream<ResultA_,​ResultB_> groupBy​(BiConstraintCollector<A,​B,​ResultContainerA_,​ResultA_> collectorA,
                                                                                                                                        BiConstraintCollector<A,​B,​ResultContainerB_,​ResultB_> collectorB)

      Convert the `BiConstraintStream` to a `BiConstraintStream`, containing only a single tuple, the result of applying two `BiConstraintCollector`s.
      Type Parameters:
        `ResultContainerA_` - the mutable accumulation type (often hidden as an implementation detail)
        `ResultA_` - the type of the first fact in the destination `BiConstraintStream`'s tuple
        `ResultContainerB_` - the mutable accumulation type (often hidden as an implementation detail)
        `ResultB_` - the type of the second fact in the destination `BiConstraintStream`'s tuple
      Parameters:
        `collectorA` - never null, the collector to perform the first grouping operation with See `ConstraintCollectors` for common operations, such as `count()`, `sum()` and others.
        `collectorB` - never null, the collector to perform the second grouping operation with See `ConstraintCollectors` for common operations, such as `count()`, `sum()` and others.
      Returns:
        never null

    - #### groupBy

          <ResultContainerA_,​ResultA_,​ResultContainerB_,​ResultB_,​ResultContainerC_,​ResultC_> TriConstraintStream<ResultA_,​ResultB_,​ResultC_> groupBy​(BiConstraintCollector<A,​B,​ResultContainerA_,​ResultA_> collectorA,
                                                                                                                                                                                               BiConstraintCollector<A,​B,​ResultContainerB_,​ResultB_> collectorB,
                                                                                                                                                                                               BiConstraintCollector<A,​B,​ResultContainerC_,​ResultC_> collectorC)

      Convert the `BiConstraintStream` to a `TriConstraintStream`, containing only a single tuple, the result of applying three `BiConstraintCollector`s.
      Type Parameters:
        `ResultContainerA_` - the mutable accumulation type (often hidden as an implementation detail)
        `ResultA_` - the type of the first fact in the destination `TriConstraintStream`'s tuple
        `ResultContainerB_` - the mutable accumulation type (often hidden as an implementation detail)
        `ResultB_` - the type of the second fact in the destination `TriConstraintStream`'s tuple
        `ResultContainerC_` - the mutable accumulation type (often hidden as an implementation detail)
        `ResultC_` - the type of the third fact in the destination `TriConstraintStream`'s tuple
      Parameters:
        `collectorA` - never null, the collector to perform the first grouping operation with See `ConstraintCollectors` for common operations, such as `count()`, `sum()` and others.
        `collectorB` - never null, the collector to perform the second grouping operation with See `ConstraintCollectors` for common operations, such as `count()`, `sum()` and others.
        `collectorC` - never null, the collector to perform the third grouping operation with See `ConstraintCollectors` for common operations, such as `count()`, `sum()` and others.
      Returns:
        never null

    - #### groupBy

          <ResultContainerA_,​ResultA_,​ResultContainerB_,​ResultB_,​ResultContainerC_,​ResultC_,​ResultContainerD_,​ResultD_> QuadConstraintStream<ResultA_,​ResultB_,​ResultC_,​ResultD_> groupBy​(BiConstraintCollector<A,​B,​ResultContainerA_,​ResultA_> collectorA,
                                                                                                                                                                                                                                                      BiConstraintCollector<A,​B,​ResultContainerB_,​ResultB_> collectorB,
                                                                                                                                                                                                                                                      BiConstraintCollector<A,​B,​ResultContainerC_,​ResultC_> collectorC,
                                                                                                                                                                                                                                                      BiConstraintCollector<A,​B,​ResultContainerD_,​ResultD_> collectorD)

      Convert the `BiConstraintStream` to a `QuadConstraintStream`, containing only a single tuple, the result of applying four `BiConstraintCollector`s.
      Type Parameters:
        `ResultContainerA_` - the mutable accumulation type (often hidden as an implementation detail)
        `ResultA_` - the type of the first fact in the destination `QuadConstraintStream`'s tuple
        `ResultContainerB_` - the mutable accumulation type (often hidden as an implementation detail)
        `ResultB_` - the type of the second fact in the destination `QuadConstraintStream`'s tuple
        `ResultContainerC_` - the mutable accumulation type (often hidden as an implementation detail)
        `ResultC_` - the type of the third fact in the destination `QuadConstraintStream`'s tuple
        `ResultContainerD_` - the mutable accumulation type (often hidden as an implementation detail)
        `ResultD_` - the type of the fourth fact in the destination `QuadConstraintStream`'s tuple
      Parameters:
        `collectorA` - never null, the collector to perform the first grouping operation with See `ConstraintCollectors` for common operations, such as `count()`, `sum()` and others.
        `collectorB` - never null, the collector to perform the second grouping operation with See `ConstraintCollectors` for common operations, such as `count()`, `sum()` and others.
        `collectorC` - never null, the collector to perform the third grouping operation with See `ConstraintCollectors` for common operations, such as `count()`, `sum()` and others.
        `collectorD` - never null, the collector to perform the fourth grouping operation with See `ConstraintCollectors` for common operations, such as `count()`, `sum()` and others.
      Returns:
        never null

    - #### groupBy

          <GroupKey_> UniConstraintStream<GroupKey_> groupBy​(BiFunction<A,​B,​GroupKey_> groupKeyMapping)

      Convert the `BiConstraintStream` to a `UniConstraintStream`, containing the set of tuples resulting from applying the group key mapping function on all tuples of the original stream. Neither tuple of the new stream `Objects.equals(Object, Object)` any other.
      Type Parameters:
        `GroupKey_` - the type of a fact in the destination `UniConstraintStream`'s tuple
      Parameters:
        `groupKeyMapping` - never null, mapping function to convert each element in the stream to a different element
      Returns:
        never null

    - #### groupBy

          <GroupKey_,​ResultContainer_,​Result_> BiConstraintStream<GroupKey_,​Result_> groupBy​(BiFunction<A,​B,​GroupKey_> groupKeyMapping,
                                                                                                               BiConstraintCollector<A,​B,​ResultContainer_,​Result_> collector)

      Convert the `BiConstraintStream` to a different `BiConstraintStream`, consisting of unique tuples.

      The first fact is the return value of the group key mapping function, applied on the incoming tuple. The second fact is the return value of a given `BiConstraintCollector` applied on all incoming tuples with the same first fact.

      Type Parameters:
        `GroupKey_` - the type of the first fact in the destination `BiConstraintStream`'s tuple
        `ResultContainer_` - the mutable accumulation type (often hidden as an implementation detail)
        `Result_` - the type of the second fact in the destination `BiConstraintStream`'s tuple
      Parameters:
        `groupKeyMapping` - never null, function to convert the fact in the original tuple to a different fact
        `collector` - never null, the collector to perform the grouping operation with See `ConstraintCollectors` for common operations, such as `count()`, `sum()` and others.
      Returns:
        never null

    - #### groupBy

          <GroupKey_,​ResultContainerB_,​ResultB_,​ResultContainerC_,​ResultC_> TriConstraintStream<GroupKey_,​ResultB_,​ResultC_> groupBy​(BiFunction<A,​B,​GroupKey_> groupKeyMapping,
                                                                                                                                                                         BiConstraintCollector<A,​B,​ResultContainerB_,​ResultB_> collectorB,
                                                                                                                                                                         BiConstraintCollector<A,​B,​ResultContainerC_,​ResultC_> collectorC)

      Convert the `BiConstraintStream` to a `TriConstraintStream`, consisting of unique tuples with three facts.

      The first fact is the return value of the group key mapping function, applied on the incoming tuple. The remaining facts are the return value of the respective `BiConstraintCollector` applied on all incoming tuples with the same first fact.

      Type Parameters:
        `GroupKey_` - the type of the first fact in the destination `TriConstraintStream`'s tuple
        `ResultContainerB_` - the mutable accumulation type (often hidden as an implementation detail)
        `ResultB_` - the type of the second fact in the destination `TriConstraintStream`'s tuple
        `ResultContainerC_` - the mutable accumulation type (often hidden as an implementation detail)
        `ResultC_` - the type of the third fact in the destination `TriConstraintStream`'s tuple
      Parameters:
        `groupKeyMapping` - never null, function to convert the fact in the original tuple to a different fact
        `collectorB` - never null, the collector to perform the first grouping operation with See `ConstraintCollectors` for common operations, such as `count()`, `sum()` and others.
        `collectorC` - never null, the collector to perform the second grouping operation with See `ConstraintCollectors` for common operations, such as `count()`, `sum()` and others.
      Returns:
        never null

    - #### groupBy

          <GroupKey_,​ResultContainerB_,​ResultB_,​ResultContainerC_,​ResultC_,​ResultContainerD_,​ResultD_> QuadConstraintStream<GroupKey_,​ResultB_,​ResultC_,​ResultD_> groupBy​(BiFunction<A,​B,​GroupKey_> groupKeyMapping,
                                                                                                                                                                                                                                BiConstraintCollector<A,​B,​ResultContainerB_,​ResultB_> collectorB,
                                                                                                                                                                                                                                BiConstraintCollector<A,​B,​ResultContainerC_,​ResultC_> collectorC,
                                                                                                                                                                                                                                BiConstraintCollector<A,​B,​ResultContainerD_,​ResultD_> collectorD)

      Convert the `BiConstraintStream` to a `QuadConstraintStream`, consisting of unique tuples with four facts.

      The first fact is the return value of the group key mapping function, applied on the incoming tuple. The remaining facts are the return value of the respective `BiConstraintCollector` applied on all incoming tuples with the same first fact.

      Type Parameters:
        `GroupKey_` - the type of the first fact in the destination `QuadConstraintStream`'s tuple
        `ResultContainerB_` - the mutable accumulation type (often hidden as an implementation detail)
        `ResultB_` - the type of the second fact in the destination `QuadConstraintStream`'s tuple
        `ResultContainerC_` - the mutable accumulation type (often hidden as an implementation detail)
        `ResultC_` - the type of the third fact in the destination `QuadConstraintStream`'s tuple
        `ResultContainerD_` - the mutable accumulation type (often hidden as an implementation detail)
        `ResultD_` - the type of the fourth fact in the destination `QuadConstraintStream`'s tuple
      Parameters:
        `groupKeyMapping` - never null, function to convert the fact in the original tuple to a different fact
        `collectorB` - never null, the collector to perform the first grouping operation with See `ConstraintCollectors` for common operations, such as `count()`, `sum()` and others.
        `collectorC` - never null, the collector to perform the second grouping operation with See `ConstraintCollectors` for common operations, such as `count()`, `sum()` and others.
        `collectorD` - never null, the collector to perform the third grouping operation with See `ConstraintCollectors` for common operations, such as `count()`, `sum()` and others.
      Returns:
        never null

    - #### groupBy

          <GroupKeyA_,​GroupKeyB_> BiConstraintStream<GroupKeyA_,​GroupKeyB_> groupBy​(BiFunction<A,​B,​GroupKeyA_> groupKeyAMapping,
                                                                                                BiFunction<A,​B,​GroupKeyB_> groupKeyBMapping)

      Convert the `BiConstraintStream` to a different `BiConstraintStream`, consisting of unique tuples.

      The first fact is the return value of the first group key mapping function, applied on the incoming tuple. The second fact is the return value of the second group key mapping function, applied on all incoming tuples with the same first fact.

      Type Parameters:
        `GroupKeyA_` - the type of the first fact in the destination `BiConstraintStream`'s tuple
        `GroupKeyB_` - the type of the second fact in the destination `BiConstraintStream`'s tuple
      Parameters:
        `groupKeyAMapping` - never null, function to convert the facts in the original tuple to a new fact
        `groupKeyBMapping` - never null, function to convert the facts in the original tuple to another new fact
      Returns:
        never null

    - #### groupBy

          <GroupKeyA_,​GroupKeyB_,​ResultContainer_,​Result_> TriConstraintStream<GroupKeyA_,​GroupKeyB_,​Result_> groupBy​(BiFunction<A,​B,​GroupKeyA_> groupKeyAMapping,
                                                                                                                                                    BiFunction<A,​B,​GroupKeyB_> groupKeyBMapping,
                                                                                                                                                    BiConstraintCollector<A,​B,​ResultContainer_,​Result_> collector)

      Combines the semantics of `groupBy(BiFunction, BiFunction)` and `groupBy(BiConstraintCollector)`. That is, the first and second facts in the tuple follow the `groupBy(BiFunction, BiFunction)` semantics, and the third fact is the result of applying `BiConstraintCollector.finisher()` on all the tuples of the original `UniConstraintStream` that belong to the group.
      Type Parameters:
        `GroupKeyA_` - the type of the first fact in the destination `TriConstraintStream`'s tuple
        `GroupKeyB_` - the type of the second fact in the destination `TriConstraintStream`'s tuple
        `ResultContainer_` - the mutable accumulation type (often hidden as an implementation detail)
        `Result_` - the type of the third fact in the destination `TriConstraintStream`'s tuple
      Parameters:
        `groupKeyAMapping` - never null, function to convert the original tuple into a first fact
        `groupKeyBMapping` - never null, function to convert the original tuple into a second fact
        `collector` - never null, the collector to perform the grouping operation with See `ConstraintCollectors` for common operations, such as `count()`, `sum()` and others.
      Returns:
        never null

    - #### groupBy

          <GroupKeyA_,​GroupKeyB_,​ResultContainerC_,​ResultC_,​ResultContainerD_,​ResultD_> QuadConstraintStream<GroupKeyA_,​GroupKeyB_,​ResultC_,​ResultD_> groupBy​(BiFunction<A,​B,​GroupKeyA_> groupKeyAMapping,
                                                                                                                                                                                                              BiFunction<A,​B,​GroupKeyB_> groupKeyBMapping,
                                                                                                                                                                                                              BiConstraintCollector<A,​B,​ResultContainerC_,​ResultC_> collectorC,
                                                                                                                                                                                                              BiConstraintCollector<A,​B,​ResultContainerD_,​ResultD_> collectorD)

      Combines the semantics of `groupBy(BiFunction, BiFunction)` and `groupBy(BiConstraintCollector)`. That is, the first and second facts in the tuple follow the `groupBy(BiFunction, BiFunction)` semantics. The third fact is the result of applying the first `BiConstraintCollector.finisher()` on all the tuples of the original `BiConstraintStream` that belong to the group. The fourth fact is the result of applying the second `BiConstraintCollector.finisher()` on all the tuples of the original `BiConstraintStream` that belong to the group
      Type Parameters:
        `GroupKeyA_` - the type of the first fact in the destination `QuadConstraintStream`'s tuple
        `GroupKeyB_` - the type of the second fact in the destination `QuadConstraintStream`'s tuple
        `ResultContainerC_` - the mutable accumulation type (often hidden as an implementation detail)
        `ResultC_` - the type of the third fact in the destination `QuadConstraintStream`'s tuple
        `ResultContainerD_` - the mutable accumulation type (often hidden as an implementation detail)
        `ResultD_` - the type of the fourth fact in the destination `QuadConstraintStream`'s tuple
      Parameters:
        `groupKeyAMapping` - never null, function to convert the original tuple into a first fact
        `groupKeyBMapping` - never null, function to convert the original tuple into a second fact
        `collectorC` - never null, the collector to perform the first grouping operation with See `ConstraintCollectors` for common operations, such as `count()`, `sum()` and others.
        `collectorD` - never null, the collector to perform the second grouping operation with See `ConstraintCollectors` for common operations, such as `count()`, `sum()` and others.
      Returns:
        never null

    - #### penalize

          default Constraint penalize​(String constraintName,
                                      Score<?> constraintWeight,
                                      ToIntBiFunction<A,​B> matchWeigher)

      Negatively impact the `Score`: subtract the constraintWeight multiplied by the match weight. Otherwise as defined by `ConstraintStream.penalize(String, Score)`.

      For non-int `Score` types use `penalizeLong(String, Score, ToLongBiFunction)` or `penalizeBigDecimal(String, Score, BiFunction)` instead.

      Parameters:
        `constraintName` - never null, shows up in `ConstraintMatchTotal` during score justification
        `constraintWeight` - never null
        `matchWeigher` - never null, the result of this function (matchWeight) is multiplied by the constraintWeight
      Returns:
        never null

    - #### penalize

          Constraint penalize​(String constraintPackage,
                              String constraintName,
                              Score<?> constraintWeight,
                              ToIntBiFunction<A,​B> matchWeigher)

      As defined by `penalize(String, Score, ToIntBiFunction)`.
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
        `constraintWeight` - never null
        `matchWeigher` - never null
      Returns:
        never null

    - #### penalizeLong

          default Constraint penalizeLong​(String constraintName,
                                          Score<?> constraintWeight,
                                          ToLongBiFunction<A,​B> matchWeigher)

      Negatively impact the `Score`: subtract the constraintWeight multiplied by the match weight. Otherwise as defined by `ConstraintStream.penalize(String, Score)`.
      Parameters:
        `constraintName` - never null, shows up in `ConstraintMatchTotal` during score justification
        `constraintWeight` - never null
        `matchWeigher` - never null, the result of this function (matchWeight) is multiplied by the constraintWeight
      Returns:
        never null

    - #### penalizeLong

          Constraint penalizeLong​(String constraintPackage,
                                  String constraintName,
                                  Score<?> constraintWeight,
                                  ToLongBiFunction<A,​B> matchWeigher)

      As defined by `penalizeLong(String, Score, ToLongBiFunction)`.
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
        `constraintWeight` - never null
        `matchWeigher` - never null
      Returns:
        never null

    - #### penalizeBigDecimal

          default Constraint penalizeBigDecimal​(String constraintName,
                                                Score<?> constraintWeight,
                                                BiFunction<A,​B,​BigDecimal> matchWeigher)

      Negatively impact the `Score`: subtract the constraintWeight multiplied by the match weight. Otherwise as defined by `ConstraintStream.penalize(String, Score)`.
      Parameters:
        `constraintName` - never null, shows up in `ConstraintMatchTotal` during score justification
        `constraintWeight` - never null
        `matchWeigher` - never null, the result of this function (matchWeight) is multiplied by the constraintWeight
      Returns:
        never null

    - #### penalizeBigDecimal

          Constraint penalizeBigDecimal​(String constraintPackage,
                                        String constraintName,
                                        Score<?> constraintWeight,
                                        BiFunction<A,​B,​BigDecimal> matchWeigher)

      As defined by `penalizeBigDecimal(String, Score, BiFunction)`.
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
        `constraintWeight` - never null
        `matchWeigher` - never null
      Returns:
        never null

    - #### penalizeConfigurable

          default Constraint penalizeConfigurable​(String constraintName,
                                                  ToIntBiFunction<A,​B> matchWeigher)

      Negatively impact the `Score`: subtract the `ConstraintWeight` multiplied by the match weight. Otherwise as defined by `ConstraintStream.penalizeConfigurable(String)`.

      For non-int `Score` types use `penalizeConfigurableLong(String, ToLongBiFunction)` or `penalizeConfigurableBigDecimal(String, BiFunction)` instead.

      Parameters:
        `constraintName` - never null, shows up in `ConstraintMatchTotal` during score justification
        `matchWeigher` - never null, the result of this function (matchWeight) is multiplied by the constraintWeight
      Returns:
        never null

    - #### penalizeConfigurable

          Constraint penalizeConfigurable​(String constraintPackage,
                                          String constraintName,
                                          ToIntBiFunction<A,​B> matchWeigher)

      As defined by `penalizeConfigurable(String, ToIntBiFunction)`.
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
        `matchWeigher` - never null
      Returns:
        never null

    - #### penalizeConfigurableLong

          default Constraint penalizeConfigurableLong​(String constraintName,
                                                      ToLongBiFunction<A,​B> matchWeigher)

      Negatively impact the `Score`: subtract the `ConstraintWeight` multiplied by the match weight. Otherwise as defined by `ConstraintStream.penalizeConfigurable(String)`.
      Parameters:
        `constraintName` - never null, shows up in `ConstraintMatchTotal` during score justification
        `matchWeigher` - never null, the result of this function (matchWeight) is multiplied by the constraintWeight
      Returns:
        never null

    - #### penalizeConfigurableLong

          Constraint penalizeConfigurableLong​(String constraintPackage,
                                              String constraintName,
                                              ToLongBiFunction<A,​B> matchWeigher)

      As defined by `penalizeConfigurableLong(String, ToLongBiFunction)`.
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
        `matchWeigher` - never null
      Returns:
        never null

    - #### penalizeConfigurableBigDecimal

          default Constraint penalizeConfigurableBigDecimal​(String constraintName,
                                                            BiFunction<A,​B,​BigDecimal> matchWeigher)

      Negatively impact the `Score`: subtract the `ConstraintWeight` multiplied by the match weight. Otherwise as defined by `ConstraintStream.penalizeConfigurable(String)`.
      Parameters:
        `constraintName` - never null, shows up in `ConstraintMatchTotal` during score justification
        `matchWeigher` - never null, the result of this function (matchWeight) is multiplied by the constraintWeight
      Returns:
        never null

    - #### penalizeConfigurableBigDecimal

          Constraint penalizeConfigurableBigDecimal​(String constraintPackage,
                                                    String constraintName,
                                                    BiFunction<A,​B,​BigDecimal> matchWeigher)

      As defined by `penalizeConfigurableBigDecimal(String, BiFunction)`.
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
        `matchWeigher` - never null
      Returns:
        never null

    - #### reward

          default Constraint reward​(String constraintName,
                                    Score<?> constraintWeight,
                                    ToIntBiFunction<A,​B> matchWeigher)

      Positively impact the `Score`: add the constraintWeight multiplied by the match weight. Otherwise as defined by `ConstraintStream.reward(String, Score)`.

      For non-int `Score` types use `rewardLong(String, Score, ToLongBiFunction)` or `rewardBigDecimal(String, Score, BiFunction)` instead.

      Parameters:
        `constraintName` - never null, shows up in `ConstraintMatchTotal` during score justification
        `constraintWeight` - never null
        `matchWeigher` - never null, the result of this function (matchWeight) is multiplied by the constraintWeight
      Returns:
        never null

    - #### reward

          Constraint reward​(String constraintPackage,
                            String constraintName,
                            Score<?> constraintWeight,
                            ToIntBiFunction<A,​B> matchWeigher)

      As defined by `reward(String, Score, ToIntBiFunction)`.
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
        `constraintWeight` - never null
        `matchWeigher` - never null
      Returns:
        never null

    - #### rewardLong

          default Constraint rewardLong​(String constraintName,
                                        Score<?> constraintWeight,
                                        ToLongBiFunction<A,​B> matchWeigher)

      Positively impact the `Score`: add the constraintWeight multiplied by the match weight. Otherwise as defined by `ConstraintStream.reward(String, Score)`.
      Parameters:
        `constraintName` - never null, shows up in `ConstraintMatchTotal` during score justification
        `constraintWeight` - never null
        `matchWeigher` - never null, the result of this function (matchWeight) is multiplied by the constraintWeight
      Returns:
        never null

    - #### rewardLong

          Constraint rewardLong​(String constraintPackage,
                                String constraintName,
                                Score<?> constraintWeight,
                                ToLongBiFunction<A,​B> matchWeigher)

      As defined by `rewardLong(String, Score, ToLongBiFunction)`.
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
        `constraintWeight` - never null
        `matchWeigher` - never null
      Returns:
        never null

    - #### rewardBigDecimal

          default Constraint rewardBigDecimal​(String constraintName,
                                              Score<?> constraintWeight,
                                              BiFunction<A,​B,​BigDecimal> matchWeigher)

      Positively impact the `Score`: add the constraintWeight multiplied by the match weight. Otherwise as defined by `ConstraintStream.reward(String, Score)`.
      Parameters:
        `constraintName` - never null, shows up in `ConstraintMatchTotal` during score justification
        `constraintWeight` - never null
        `matchWeigher` - never null, the result of this function (matchWeight) is multiplied by the constraintWeight
      Returns:
        never null

    - #### rewardBigDecimal

          Constraint rewardBigDecimal​(String constraintPackage,
                                      String constraintName,
                                      Score<?> constraintWeight,
                                      BiFunction<A,​B,​BigDecimal> matchWeigher)

      As defined by `rewardBigDecimal(String, Score, BiFunction)`.
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
        `constraintWeight` - never null
        `matchWeigher` - never null
      Returns:
        never null

    - #### rewardConfigurable

          default Constraint rewardConfigurable​(String constraintName,
                                                ToIntBiFunction<A,​B> matchWeigher)

      Positively impact the `Score`: add the `ConstraintWeight` multiplied by the match weight. Otherwise as defined by `ConstraintStream.rewardConfigurable(String)`.

      For non-int `Score` types use `rewardConfigurableLong(String, ToLongBiFunction)` or `rewardConfigurableBigDecimal(String, BiFunction)` instead.

      Parameters:
        `constraintName` - never null, shows up in `ConstraintMatchTotal` during score justification
        `matchWeigher` - never null, the result of this function (matchWeight) is multiplied by the constraintWeight
      Returns:
        never null

    - #### rewardConfigurable

          Constraint rewardConfigurable​(String constraintPackage,
                                        String constraintName,
                                        ToIntBiFunction<A,​B> matchWeigher)

      As defined by `rewardConfigurable(String, ToIntBiFunction)`.
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
        `matchWeigher` - never null
      Returns:
        never null

    - #### rewardConfigurableLong

          default Constraint rewardConfigurableLong​(String constraintName,
                                                    ToLongBiFunction<A,​B> matchWeigher)

      Positively impact the `Score`: add the `ConstraintWeight` multiplied by the match weight. Otherwise as defined by `ConstraintStream.rewardConfigurable(String)`.
      Parameters:
        `constraintName` - never null, shows up in `ConstraintMatchTotal` during score justification
        `matchWeigher` - never null, the result of this function (matchWeight) is multiplied by the constraintWeight
      Returns:
        never null

    - #### rewardConfigurableLong

          Constraint rewardConfigurableLong​(String constraintPackage,
                                            String constraintName,
                                            ToLongBiFunction<A,​B> matchWeigher)

      As defined by `rewardConfigurableLong(String, ToLongBiFunction)`.
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
        `matchWeigher` - never null
      Returns:
        never null

    - #### rewardConfigurableBigDecimal

          default Constraint rewardConfigurableBigDecimal​(String constraintName,
                                                          BiFunction<A,​B,​BigDecimal> matchWeigher)

      Positively impact the `Score`: add the `ConstraintWeight` multiplied by the match weight. Otherwise as defined by `ConstraintStream.rewardConfigurable(String)`.
      Parameters:
        `constraintName` - never null, shows up in `ConstraintMatchTotal` during score justification
        `matchWeigher` - never null, the result of this function (matchWeight) is multiplied by the constraintWeight
      Returns:
        never null

    - #### rewardConfigurableBigDecimal

          Constraint rewardConfigurableBigDecimal​(String constraintPackage,
                                                  String constraintName,
                                                  BiFunction<A,​B,​BigDecimal> matchWeigher)

      As defined by `rewardConfigurableBigDecimal(String, BiFunction)`.
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
        `matchWeigher` - never null
      Returns:
        never null

    - #### impact

          default Constraint impact​(String constraintName,
                                    Score<?> constraintWeight,
                                    ToIntBiFunction<A,​B> matchWeigher)

      Positively or negatively impact the `Score` by the constraintWeight multiplied by the match weight. Otherwise as defined by `ConstraintStream.impact(String, Score)`.

      Use `penalize(...)` or `reward(...)` instead, unless this constraint can both have positive and negative weights.

      For non-int `Score` types use `impactLong(String, Score, ToLongBiFunction)` or `impactBigDecimal(String, Score, BiFunction)` instead.

      Parameters:
        `constraintName` - never null, shows up in `ConstraintMatchTotal` during score justification
        `constraintWeight` - never null
        `matchWeigher` - never null, the result of this function (matchWeight) is multiplied by the constraintWeight
      Returns:
        never null

    - #### impact

          Constraint impact​(String constraintPackage,
                            String constraintName,
                            Score<?> constraintWeight,
                            ToIntBiFunction<A,​B> matchWeigher)

      As defined by `impact(String, Score, ToIntBiFunction)`.
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
        `constraintWeight` - never null
        `matchWeigher` - never null
      Returns:
        never null

    - #### impactLong

          default Constraint impactLong​(String constraintName,
                                        Score<?> constraintWeight,
                                        ToLongBiFunction<A,​B> matchWeigher)

      Positively or negatively impact the `Score` by the constraintWeight multiplied by the match weight. Otherwise as defined by `ConstraintStream.impact(String, Score)`.

      Use `penalizeLong(...)` or `rewardLong(...)` instead, unless this constraint can both have positive and negative weights.

      Parameters:
        `constraintName` - never null, shows up in `ConstraintMatchTotal` during score justification
        `constraintWeight` - never null
        `matchWeigher` - never null, the result of this function (matchWeight) is multiplied by the constraintWeight
      Returns:
        never null

    - #### impactLong

          Constraint impactLong​(String constraintPackage,
                                String constraintName,
                                Score<?> constraintWeight,
                                ToLongBiFunction<A,​B> matchWeigher)

      As defined by `impactLong(String, Score, ToLongBiFunction)`.
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
        `constraintWeight` - never null
        `matchWeigher` - never null
      Returns:
        never null

    - #### impactBigDecimal

          default Constraint impactBigDecimal​(String constraintName,
                                              Score<?> constraintWeight,
                                              BiFunction<A,​B,​BigDecimal> matchWeigher)

      Positively or negatively impact the `Score` by the constraintWeight multiplied by the match weight. Otherwise as defined by `ConstraintStream.impact(String, Score)`.

      Use `penalizeBigDecimal(...)` or `rewardBigDecimal(...)` instead, unless this constraint can both have positive and negative weights.

      Parameters:
        `constraintName` - never null, shows up in `ConstraintMatchTotal` during score justification
        `constraintWeight` - never null
        `matchWeigher` - never null, the result of this function (matchWeight) is multiplied by the constraintWeight
      Returns:
        never null

    - #### impactBigDecimal

          Constraint impactBigDecimal​(String constraintPackage,
                                      String constraintName,
                                      Score<?> constraintWeight,
                                      BiFunction<A,​B,​BigDecimal> matchWeigher)

      As defined by `impactBigDecimal(String, Score, BiFunction)`.
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
        `constraintWeight` - never null
        `matchWeigher` - never null
      Returns:
        never null

    - #### impactConfigurable

          default Constraint impactConfigurable​(String constraintName,
                                                ToIntBiFunction<A,​B> matchWeigher)

      Positively or negatively impact the `Score` by the `ConstraintWeight` multiplied by the match weight.

      Use `penalizeConfigurable(...)` or `rewardConfigurable(...)` instead, unless this constraint can both have positive and negative weights.

      The constraintWeight comes from an `ConstraintWeight` annotated member on the `ConstraintConfiguration`, so end users can change the constraint weights dynamically. This constraint may be deactivated if the `ConstraintWeight` is zero. If there is no `ConstraintConfiguration`, use `ConstraintStream.impact(String, Score)` instead.

      The `Constraint.getConstraintPackage()` defaults to `ConstraintConfiguration.constraintPackage()`.

      Parameters:
        `constraintName` - never null, shows up in `ConstraintMatchTotal` during score justification
        `matchWeigher` - never null, the result of this function (matchWeight) is multiplied by the constraintWeight
      Returns:
        never null

    - #### impactConfigurable

          Constraint impactConfigurable​(String constraintPackage,
                                        String constraintName,
                                        ToIntBiFunction<A,​B> matchWeigher)

      As defined by `impactConfigurable(String, ToIntBiFunction)`.
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
        `matchWeigher` - never null
      Returns:
        never null

    - #### impactConfigurableLong

          default Constraint impactConfigurableLong​(String constraintName,
                                                    ToLongBiFunction<A,​B> matchWeigher)

      Positively or negatively impact the `Score` by the `ConstraintWeight` multiplied by the match weight.

      Use `penalizeConfigurableLong(...)` or `rewardConfigurableLong(...)` instead, unless this constraint can both have positive and negative weights.

      The constraintWeight comes from an `ConstraintWeight` annotated member on the `ConstraintConfiguration`, so end users can change the constraint weights dynamically. This constraint may be deactivated if the `ConstraintWeight` is zero. If there is no `ConstraintConfiguration`, use `ConstraintStream.impact(String, Score)` instead.

      The `Constraint.getConstraintPackage()` defaults to `ConstraintConfiguration.constraintPackage()`.

      Parameters:
        `constraintName` - never null, shows up in `ConstraintMatchTotal` during score justification
        `matchWeigher` - never null, the result of this function (matchWeight) is multiplied by the constraintWeight
      Returns:
        never null

    - #### impactConfigurableLong

          Constraint impactConfigurableLong​(String constraintPackage,
                                            String constraintName,
                                            ToLongBiFunction<A,​B> matchWeigher)

      As defined by `impactConfigurableLong(String, ToLongBiFunction)`.
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
        `matchWeigher` - never null
      Returns:
        never null

    - #### impactConfigurableBigDecimal

          default Constraint impactConfigurableBigDecimal​(String constraintName,
                                                          BiFunction<A,​B,​BigDecimal> matchWeigher)

      Positively or negatively impact the `Score` by the `ConstraintWeight` multiplied by the match weight.

      Use `penalizeConfigurableBigDecimal(...)` or `rewardConfigurableBigDecimal(...)` instead, unless this constraint can both have positive and negative weights.

      The constraintWeight comes from an `ConstraintWeight` annotated member on the `ConstraintConfiguration`, so end users can change the constraint weights dynamically. This constraint may be deactivated if the `ConstraintWeight` is zero. If there is no `ConstraintConfiguration`, use `ConstraintStream.impact(String, Score)` instead.

      The `Constraint.getConstraintPackage()` defaults to `ConstraintConfiguration.constraintPackage()`.

      Parameters:
        `constraintName` - never null, shows up in `ConstraintMatchTotal` during score justification
        `matchWeigher` - never null, the result of this function (matchWeight) is multiplied by the constraintWeight
      Returns:
        never null

    - #### impactConfigurableBigDecimal

          Constraint impactConfigurableBigDecimal​(String constraintPackage,
                                                  String constraintName,
                                                  BiFunction<A,​B,​BigDecimal> matchWeigher)

      As defined by `impactConfigurableBigDecimal(String, BiFunction)`.
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
        `matchWeigher` - never null
      Returns:
        never null