Package org.optaplanner.core.impl.score.stream.drools.tri

## Class DroolsAbstractTriConstraintStream<Solution_,​A,​B,​C>

- java.lang.Object
- - org.optaplanner.core.impl.score.stream.common.AbstractConstraintStream<Solution_>
  - - org.optaplanner.core.impl.score.stream.drools.common.DroolsAbstractConstraintStream<Solution_>
    - - org.optaplanner.core.impl.score.stream.drools.tri.DroolsAbstractTriConstraintStream<Solution_,​A,​B,​C>

- All Implemented Interfaces:
    `ConstraintStream`, `TriConstraintStream<A,​B,​C>`, `InnerTriConstraintStream<A,​B,​C>`
  Direct Known Subclasses:
    `DroolsExistsTriConstraintStream`, `DroolsFilterTriConstraintStream`, `DroolsGroupingTriConstraintStream`, `DroolsJoinTriConstraintStream`

      public abstract class DroolsAbstractTriConstraintStream<Solution_,​A,​B,​C>
      extends DroolsAbstractConstraintStream<Solution_>
      implements InnerTriConstraintStream<A,​B,​C>

- - ### Field Summary

    - ### Fields inherited from class org.optaplanner.core.impl.score.stream.drools.common.DroolsAbstractConstraintStream

      `constraintFactory`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DroolsAbstractTriConstraintStream​(DroolsConstraintFactory<Solution_> constraintFactory)` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `TriConstraintStream<A,​B,​C>` | `filter​(TriPredicate<A,​B,​C> predicate)` | Exhaustively test each tuple of facts against the `TriPredicate` and match if `TriPredicate.test(Object, Object, Object)` returns true.
    `abstract TriLeftHandSide<A,​B,​C>` | `getLeftHandSide()` |
    `<GroupKey_> UniConstraintStream<GroupKey_>` | `groupBy​(TriFunction<A,​B,​C,​GroupKey_> groupKeyMapping)` | Convert the `TriConstraintStream` 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​(TriFunction<A,​B,​C,​GroupKey_> groupKeyMapping, TriConstraintCollector<A,​B,​C,​ResultContainer_,​Result_> collector)` | Convert the `TriConstraintStream` to a `BiConstraintStream`, consisting of unique tuples.
    `<GroupKey_,​ResultContainerB_,​ResultB_,​ResultContainerC_,​ResultC_> TriConstraintStream<GroupKey_,​ResultB_,​ResultC_>` | `groupBy​(TriFunction<A,​B,​C,​GroupKey_> groupKeyMapping, TriConstraintCollector<A,​B,​C,​ResultContainerB_,​ResultB_> collectorB, TriConstraintCollector<A,​B,​C,​ResultContainerC_,​ResultC_> collectorC)` | Convert the `TriConstraintStream` to a `TriConstraintStream`, consisting of unique tuples with three facts.
    `<GroupKey_,​ResultContainerB_,​ResultB_,​ResultContainerC_,​ResultC_,​ResultContainerD_,​ResultD_> QuadConstraintStream<GroupKey_,​ResultB_,​ResultC_,​ResultD_>` | `groupBy​(TriFunction<A,​B,​C,​GroupKey_> groupKeyMapping, TriConstraintCollector<A,​B,​C,​ResultContainerB_,​ResultB_> collectorB, TriConstraintCollector<A,​B,​C,​ResultContainerC_,​ResultC_> collectorC, TriConstraintCollector<A,​B,​C,​ResultContainerD_,​ResultD_> collectorD)` | Convert the `TriConstraintStream` to a `QuadConstraintStream`, consisting of unique tuples with four facts.
    `<GroupKeyA_,​GroupKeyB_> BiConstraintStream<GroupKeyA_,​GroupKeyB_>` | `groupBy​(TriFunction<A,​B,​C,​GroupKeyA_> groupKeyAMapping, TriFunction<A,​B,​C,​GroupKeyB_> groupKeyBMapping)` | Convert the `TriConstraintStream` to a `BiConstraintStream`, consisting of unique tuples.
    `<GroupKeyA_,​GroupKeyB_,​GroupKeyC_> TriConstraintStream<GroupKeyA_,​GroupKeyB_,​GroupKeyC_>` | `groupBy​(TriFunction<A,​B,​C,​GroupKeyA_> groupKeyAMapping, TriFunction<A,​B,​C,​GroupKeyB_> groupKeyBMapping, TriFunction<A,​B,​C,​GroupKeyC_> groupKeyCMapping)` | Convert the `TriConstraintStream` to a `TriConstraintStream`, consisting of unique tuples with three facts.
    `<GroupKeyA_,​GroupKeyB_,​GroupKeyC_,​GroupKeyD_> QuadConstraintStream<GroupKeyA_,​GroupKeyB_,​GroupKeyC_,​GroupKeyD_>` | `groupBy​(TriFunction<A,​B,​C,​GroupKeyA_> groupKeyAMapping, TriFunction<A,​B,​C,​GroupKeyB_> groupKeyBMapping, TriFunction<A,​B,​C,​GroupKeyC_> groupKeyCMapping, TriFunction<A,​B,​C,​GroupKeyD_> groupKeyDMapping)` | Convert the `TriConstraintStream` to a `QuadConstraintStream`, consisting of unique tuples with four facts.
    `<GroupKeyA_,​GroupKeyB_,​GroupKeyC_,​ResultContainerD_,​ResultD_> QuadConstraintStream<GroupKeyA_,​GroupKeyB_,​GroupKeyC_,​ResultD_>` | `groupBy​(TriFunction<A,​B,​C,​GroupKeyA_> groupKeyAMapping, TriFunction<A,​B,​C,​GroupKeyB_> groupKeyBMapping, TriFunction<A,​B,​C,​GroupKeyC_> groupKeyCMapping, TriConstraintCollector<A,​B,​C,​ResultContainerD_,​ResultD_> collectorD)` | Combines the semantics of `TriConstraintStream.groupBy(TriFunction, TriFunction)` and `TriConstraintStream.groupBy(TriConstraintCollector)`.
    `<GroupKeyA_,​GroupKeyB_,​ResultContainer_,​Result_> TriConstraintStream<GroupKeyA_,​GroupKeyB_,​Result_>` | `groupBy​(TriFunction<A,​B,​C,​GroupKeyA_> groupKeyAMapping, TriFunction<A,​B,​C,​GroupKeyB_> groupKeyBMapping, TriConstraintCollector<A,​B,​C,​ResultContainer_,​Result_> collector)` | Combines the semantics of `TriConstraintStream.groupBy(TriFunction, TriFunction)` and `TriConstraintStream.groupBy(TriConstraintCollector)`.
    `<GroupKeyA_,​GroupKeyB_,​ResultContainerC_,​ResultC_,​ResultContainerD_,​ResultD_> QuadConstraintStream<GroupKeyA_,​GroupKeyB_,​ResultC_,​ResultD_>` | `groupBy​(TriFunction<A,​B,​C,​GroupKeyA_> groupKeyAMapping, TriFunction<A,​B,​C,​GroupKeyB_> groupKeyBMapping, TriConstraintCollector<A,​B,​C,​ResultContainerC_,​ResultC_> collectorC, TriConstraintCollector<A,​B,​C,​ResultContainerD_,​ResultD_> collectorD)` | Combines the semantics of `TriConstraintStream.groupBy(TriFunction, TriFunction)` and `TriConstraintStream.groupBy(TriConstraintCollector)`.
    `<ResultContainer_,​Result_> UniConstraintStream<Result_>` | `groupBy​(TriConstraintCollector<A,​B,​C,​ResultContainer_,​Result_> collector)` | Convert the `TriConstraintStream` to a `UniConstraintStream`, containing only a single tuple, the result of applying `TriConstraintCollector`.
    `<ResultContainerA_,​ResultA_,​ResultContainerB_,​ResultB_> BiConstraintStream<ResultA_,​ResultB_>` | `groupBy​(TriConstraintCollector<A,​B,​C,​ResultContainerA_,​ResultA_> collectorA, TriConstraintCollector<A,​B,​C,​ResultContainerB_,​ResultB_> collectorB)` | Convert the `TriConstraintStream` to a `BiConstraintStream`, containing only a single tuple, the result of applying two `TriConstraintCollector`s.
    `<ResultContainerA_,​ResultA_,​ResultContainerB_,​ResultB_,​ResultContainerC_,​ResultC_> TriConstraintStream<ResultA_,​ResultB_,​ResultC_>` | `groupBy​(TriConstraintCollector<A,​B,​C,​ResultContainerA_,​ResultA_> collectorA, TriConstraintCollector<A,​B,​C,​ResultContainerB_,​ResultB_> collectorB, TriConstraintCollector<A,​B,​C,​ResultContainerC_,​ResultC_> collectorC)` | Convert the `TriConstraintStream` to a `TriConstraintStream`, containing only a single tuple, the result of applying three `TriConstraintCollector`s.
    `<ResultContainerA_,​ResultA_,​ResultContainerB_,​ResultB_,​ResultContainerC_,​ResultC_,​ResultContainerD_,​ResultD_> QuadConstraintStream<ResultA_,​ResultB_,​ResultC_,​ResultD_>` | `groupBy​(TriConstraintCollector<A,​B,​C,​ResultContainerA_,​ResultA_> collectorA, TriConstraintCollector<A,​B,​C,​ResultContainerB_,​ResultB_> collectorB, TriConstraintCollector<A,​B,​C,​ResultContainerC_,​ResultC_> collectorC, TriConstraintCollector<A,​B,​C,​ResultContainerD_,​ResultD_> collectorD)` | Convert the `TriConstraintStream` to a `QuadConstraintStream`, containing only a single tuple, the result of applying four `TriConstraintCollector`s.
    `<D> TriConstraintStream<A,​B,​C>` | `ifExists​(Class<D> otherClass, QuadJoiner<A,​B,​C,​D>... joiners)` | As defined by `TriConstraintStream.ifExists(Class, QuadJoiner)`.
    `<D> TriConstraintStream<A,​B,​C>` | `ifNotExists​(Class<D> otherClass, QuadJoiner<A,​B,​C,​D>... joiners)` | As defined by `TriConstraintStream.ifNotExists(Class, QuadJoiner)`.
    `Constraint` | `impactScore​(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntTriFunction<A,​B,​C> matchWeigher, ScoreImpactType impactType)` |
    `protected Constraint` | `impactScore​(String constraintPackage, String constraintName, Score<?> constraintWeight, ScoreImpactType impactType)` |
    `Constraint` | `impactScoreBigDecimal​(String constraintPackage, String constraintName, Score<?> constraintWeight, TriFunction<A,​B,​C,​BigDecimal> matchWeigher, ScoreImpactType impactType)` |
    `Constraint` | `impactScoreConfigurable​(String constraintPackage, String constraintName, ToIntTriFunction<A,​B,​C> matchWeigher, ScoreImpactType impactType)` |
    `protected Constraint` | `impactScoreConfigurable​(String constraintPackage, String constraintName, ScoreImpactType impactType)` |
    `Constraint` | `impactScoreConfigurableBigDecimal​(String constraintPackage, String constraintName, TriFunction<A,​B,​C,​BigDecimal> matchWeigher, ScoreImpactType impactType)` |
    `Constraint` | `impactScoreConfigurableLong​(String constraintPackage, String constraintName, ToLongTriFunction<A,​B,​C> matchWeigher, ScoreImpactType impactType)` |
    `Constraint` | `impactScoreLong​(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongTriFunction<A,​B,​C> matchWeigher, ScoreImpactType impactType)` |
    `<D> QuadConstraintStream<A,​B,​C,​D>` | `join​(UniConstraintStream<D> otherStream, QuadJoiner<A,​B,​C,​D> joiner)` | Create a new `QuadConstraintStream` for every combination of [A, B] and C for which the `QuadJoiner` is true (for the properties it extracts from all facts).
    `<ResultA_> UniConstraintStream<ResultA_>` | `map​(TriFunction<A,​B,​C,​ResultA_> mapping)` | As defined by `UniConstraintStream.map(Function)`.

    - ### Methods inherited from class org.optaplanner.core.impl.score.stream.drools.common.DroolsAbstractConstraintStream

      `addChildStream, buildConstraint, buildConstraintConfigurable, getChildStreams, getConstraintFactory`

    - ### Methods inherited from class org.optaplanner.core.impl.score.stream.common.AbstractConstraintStream

      `buildConstraintWeightExtractor, buildConstraintWeightExtractor, impact, penalize, penalizeConfigurable, reward, rewardConfigurable`

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

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

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

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

    - ### Methods inherited from interface org.optaplanner.core.impl.score.stream.tri.InnerTriConstraintStream

      `distinct, guaranteesDistinct, impact, impactBigDecimal, impactConfigurable, impactConfigurableBigDecimal, impactConfigurableLong, impactLong, penalize, penalizeBigDecimal, penalizeConfigurable, penalizeConfigurableBigDecimal, penalizeConfigurableLong, penalizeLong, reward, rewardBigDecimal, rewardConfigurable, rewardConfigurableBigDecimal, rewardConfigurableLong, rewardLong`

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

      `ifExists, ifExists, ifExists, ifExists, ifNotExists, ifNotExists, ifNotExists, ifNotExists, impact, impactBigDecimal, impactConfigurable, impactConfigurableBigDecimal, impactConfigurableLong, impactLong, join, join, join, join, join, join, join, join, join, join, join, penalize, penalizeBigDecimal, penalizeConfigurable, penalizeConfigurableBigDecimal, penalizeConfigurableLong, penalizeLong, reward, rewardBigDecimal, rewardConfigurable, rewardConfigurableBigDecimal, rewardConfigurableLong, rewardLong`

- - ### Constructor Detail

    - #### DroolsAbstractTriConstraintStream

          public DroolsAbstractTriConstraintStream​(DroolsConstraintFactory<Solution_> constraintFactory)

  - ### Method Detail

    - #### filter

          public TriConstraintStream<A,​B,​C> filter​(TriPredicate<A,​B,​C> predicate)

      Description copied from interface: `TriConstraintStream`
      Exhaustively test each tuple of facts against the `TriPredicate` and match if `TriPredicate.test(Object, Object, Object)` returns true.

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

      Specified by:
        `filter` in interface `TriConstraintStream<Solution_,​A,​B>`
      Parameters:
        `predicate` - never null
      Returns:
        never null

    - #### join

          public <D> QuadConstraintStream<A,​B,​C,​D> join​(UniConstraintStream<D> otherStream,
                                                                          QuadJoiner<A,​B,​C,​D> joiner)

      Description copied from interface: `TriConstraintStream`
      Create a new `QuadConstraintStream` for every combination of [A, B] and C for which the `QuadJoiner` is true (for the properties it extracts from all 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, C] and D.

      Specified by:
        `join` in interface `TriConstraintStream<Solution_,​A,​B>`
      Type Parameters:
        `D` - the type of the fourth matched fact
      Parameters:
        `otherStream` - never null
        `joiner` - never null
      Returns:
        never null, a stream that matches every combination of [A, B, C] and D for which the `QuadJoiner` is true

    - #### ifExists

          @SafeVarargs
          public final <D> TriConstraintStream<A,​B,​C> ifExists​(Class<D> otherClass,
                                                                           QuadJoiner<A,​B,​C,​D>... joiners)

      Description copied from interface: `TriConstraintStream`
      As defined by `TriConstraintStream.ifExists(Class, QuadJoiner)`. 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 `QuadJoiner` parameters.

      Specified by:
        `ifExists` in interface `TriConstraintStream<Solution_,​A,​B>`
      Type Parameters:
        `D` - the type of the fourth matched fact
      Parameters:
        `otherClass` - never null
        `joiners` - never null
      Returns:
        never null, a stream that matches every tuple of A, B and C where D exists for which the `QuadJoiner`s are true

    - #### ifNotExists

          @SafeVarargs
          public final <D> TriConstraintStream<A,​B,​C> ifNotExists​(Class<D> otherClass,
                                                                              QuadJoiner<A,​B,​C,​D>... joiners)

      Description copied from interface: `TriConstraintStream`
      As defined by `TriConstraintStream.ifNotExists(Class, QuadJoiner)`. 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 `QuadJoiner` parameters.

      Specified by:
        `ifNotExists` in interface `TriConstraintStream<Solution_,​A,​B>`
      Type Parameters:
        `D` - the type of the fourth matched fact
      Parameters:
        `otherClass` - never null
        `joiners` - never null
      Returns:
        never null, a stream that matches every tuple of A, B and C where D does not exist for which the `QuadJoiner`s are true

    - #### groupBy

          public <ResultContainer_,​Result_> UniConstraintStream<Result_> groupBy​(TriConstraintCollector<A,​B,​C,​ResultContainer_,​Result_> collector)

      Description copied from interface: `TriConstraintStream`
      Convert the `TriConstraintStream` to a `UniConstraintStream`, containing only a single tuple, the result of applying `TriConstraintCollector`.
      Specified by:
        `groupBy` in interface `TriConstraintStream<Solution_,​A,​B>`
      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

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

      Description copied from interface: `TriConstraintStream`
      Convert the `TriConstraintStream` to a `BiConstraintStream`, containing only a single tuple, the result of applying two `TriConstraintCollector`s.
      Specified by:
        `groupBy` in interface `TriConstraintStream<Solution_,​A,​B>`
      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

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

      Description copied from interface: `TriConstraintStream`
      Convert the `TriConstraintStream` to a `TriConstraintStream`, containing only a single tuple, the result of applying three `TriConstraintCollector`s.
      Specified by:
        `groupBy` in interface `TriConstraintStream<Solution_,​A,​B>`
      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

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

      Description copied from interface: `TriConstraintStream`
      Convert the `TriConstraintStream` to a `QuadConstraintStream`, containing only a single tuple, the result of applying four `TriConstraintCollector`s.
      Specified by:
        `groupBy` in interface `TriConstraintStream<Solution_,​A,​B>`
      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

          public <GroupKey_> UniConstraintStream<GroupKey_> groupBy​(TriFunction<A,​B,​C,​GroupKey_> groupKeyMapping)

      Description copied from interface: `TriConstraintStream`
      Convert the `TriConstraintStream` 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.
      Specified by:
        `groupBy` in interface `TriConstraintStream<Solution_,​A,​B>`
      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

          public <GroupKey_,​ResultContainer_,​Result_> BiConstraintStream<GroupKey_,​Result_> groupBy​(TriFunction<A,​B,​C,​GroupKey_> groupKeyMapping,
                                                                                                                      TriConstraintCollector<A,​B,​C,​ResultContainer_,​Result_> collector)

      Description copied from interface: `TriConstraintStream`
      Convert the `TriConstraintStream` to a `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 `TriConstraintCollector` applied on all incoming tuples with the same first fact.

      Specified by:
        `groupBy` in interface `TriConstraintStream<Solution_,​A,​B>`
      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

          public <GroupKey_,​ResultContainerB_,​ResultB_,​ResultContainerC_,​ResultC_> TriConstraintStream<GroupKey_,​ResultB_,​ResultC_> groupBy​(TriFunction<A,​B,​C,​GroupKey_> groupKeyMapping,
                                                                                                                                                                                TriConstraintCollector<A,​B,​C,​ResultContainerB_,​ResultB_> collectorB,
                                                                                                                                                                                TriConstraintCollector<A,​B,​C,​ResultContainerC_,​ResultC_> collectorC)

      Description copied from interface: `TriConstraintStream`
      Convert the `TriConstraintStream` 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 `TriConstraintCollector` applied on all incoming tuples with the same first fact.

      Specified by:
        `groupBy` in interface `TriConstraintStream<Solution_,​A,​B>`
      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

          public <GroupKey_,​ResultContainerB_,​ResultB_,​ResultContainerC_,​ResultC_,​ResultContainerD_,​ResultD_> QuadConstraintStream<GroupKey_,​ResultB_,​ResultC_,​ResultD_> groupBy​(TriFunction<A,​B,​C,​GroupKey_> groupKeyMapping,
                                                                                                                                                                                                                                       TriConstraintCollector<A,​B,​C,​ResultContainerB_,​ResultB_> collectorB,
                                                                                                                                                                                                                                       TriConstraintCollector<A,​B,​C,​ResultContainerC_,​ResultC_> collectorC,
                                                                                                                                                                                                                                       TriConstraintCollector<A,​B,​C,​ResultContainerD_,​ResultD_> collectorD)

      Description copied from interface: `TriConstraintStream`
      Convert the `TriConstraintStream` 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 `TriConstraintCollector` applied on all incoming tuples with the same first fact.

      Specified by:
        `groupBy` in interface `TriConstraintStream<Solution_,​A,​B>`
      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

          public <GroupKeyA_,​GroupKeyB_> BiConstraintStream<GroupKeyA_,​GroupKeyB_> groupBy​(TriFunction<A,​B,​C,​GroupKeyA_> groupKeyAMapping,
                                                                                                       TriFunction<A,​B,​C,​GroupKeyB_> groupKeyBMapping)

      Description copied from interface: `TriConstraintStream`
      Convert the `TriConstraintStream` to a `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.

      Specified by:
        `groupBy` in interface `TriConstraintStream<Solution_,​A,​B>`
      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

          public <GroupKeyA_,​GroupKeyB_,​ResultContainer_,​Result_> TriConstraintStream<GroupKeyA_,​GroupKeyB_,​Result_> groupBy​(TriFunction<A,​B,​C,​GroupKeyA_> groupKeyAMapping,
                                                                                                                                                           TriFunction<A,​B,​C,​GroupKeyB_> groupKeyBMapping,
                                                                                                                                                           TriConstraintCollector<A,​B,​C,​ResultContainer_,​Result_> collector)

      Description copied from interface: `TriConstraintStream`
      Combines the semantics of `TriConstraintStream.groupBy(TriFunction, TriFunction)` and `TriConstraintStream.groupBy(TriConstraintCollector)`. That is, the first and second facts in the tuple follow the `TriConstraintStream.groupBy(TriFunction, TriFunction)` semantics, and the third fact is the result of applying `TriConstraintCollector.finisher()` on all the tuples of the original `UniConstraintStream` that belong to the group.
      Specified by:
        `groupBy` in interface `TriConstraintStream<Solution_,​A,​B>`
      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

          public <GroupKeyA_,​GroupKeyB_,​ResultContainerC_,​ResultC_,​ResultContainerD_,​ResultD_> QuadConstraintStream<GroupKeyA_,​GroupKeyB_,​ResultC_,​ResultD_> groupBy​(TriFunction<A,​B,​C,​GroupKeyA_> groupKeyAMapping,
                                                                                                                                                                                                                     TriFunction<A,​B,​C,​GroupKeyB_> groupKeyBMapping,
                                                                                                                                                                                                                     TriConstraintCollector<A,​B,​C,​ResultContainerC_,​ResultC_> collectorC,
                                                                                                                                                                                                                     TriConstraintCollector<A,​B,​C,​ResultContainerD_,​ResultD_> collectorD)

      Description copied from interface: `TriConstraintStream`
      Combines the semantics of `TriConstraintStream.groupBy(TriFunction, TriFunction)` and `TriConstraintStream.groupBy(TriConstraintCollector)`. That is, the first and second facts in the tuple follow the `TriConstraintStream.groupBy(TriFunction, TriFunction)` semantics. The third fact is the result of applying the first `TriConstraintCollector.finisher()` on all the tuples of the original `TriConstraintStream` that belong to the group. The fourth fact is the result of applying the second `TriConstraintCollector.finisher()` on all the tuples of the original `TriConstraintStream` that belong to the group
      Specified by:
        `groupBy` in interface `TriConstraintStream<Solution_,​A,​B>`
      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

    - #### groupBy

          public <GroupKeyA_,​GroupKeyB_,​GroupKeyC_> TriConstraintStream<GroupKeyA_,​GroupKeyB_,​GroupKeyC_> groupBy​(TriFunction<A,​B,​C,​GroupKeyA_> groupKeyAMapping,
                                                                                                                                          TriFunction<A,​B,​C,​GroupKeyB_> groupKeyBMapping,
                                                                                                                                          TriFunction<A,​B,​C,​GroupKeyC_> groupKeyCMapping)

      Description copied from interface: `TriConstraintStream`
      Convert the `TriConstraintStream` to a `TriConstraintStream`, consisting of unique tuples with three facts.

      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. The third fact is the return value of the third group key mapping function, applied on all incoming tuples with the same first fact.

      Specified by:
        `groupBy` in interface `TriConstraintStream<Solution_,​A,​B>`
      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
        `GroupKeyC_` - 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
        `groupKeyCMapping` - never null, function to convert the original tuple into a third fact
      Returns:
        never null

    - #### groupBy

          public <GroupKeyA_,​GroupKeyB_,​GroupKeyC_,​ResultContainerD_,​ResultD_> QuadConstraintStream<GroupKeyA_,​GroupKeyB_,​GroupKeyC_,​ResultD_> groupBy​(TriFunction<A,​B,​C,​GroupKeyA_> groupKeyAMapping,
                                                                                                                                                                                                 TriFunction<A,​B,​C,​GroupKeyB_> groupKeyBMapping,
                                                                                                                                                                                                 TriFunction<A,​B,​C,​GroupKeyC_> groupKeyCMapping,
                                                                                                                                                                                                 TriConstraintCollector<A,​B,​C,​ResultContainerD_,​ResultD_> collectorD)

      Description copied from interface: `TriConstraintStream`
      Combines the semantics of `TriConstraintStream.groupBy(TriFunction, TriFunction)` and `TriConstraintStream.groupBy(TriConstraintCollector)`. That is, the first three facts in the tuple follow the `TriConstraintStream.groupBy(TriFunction, TriFunction)` semantics. The final fact is the result of applying the first `TriConstraintCollector.finisher()` on all the tuples of the original `TriConstraintStream` that belong to the group.
      Specified by:
        `groupBy` in interface `TriConstraintStream<Solution_,​A,​B>`
      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
        `GroupKeyC_` - 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
        `groupKeyCMapping` - never null, function to convert the original tuple into a third fact
        `collectorD` - 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

          public <GroupKeyA_,​GroupKeyB_,​GroupKeyC_,​GroupKeyD_> QuadConstraintStream<GroupKeyA_,​GroupKeyB_,​GroupKeyC_,​GroupKeyD_> groupBy​(TriFunction<A,​B,​C,​GroupKeyA_> groupKeyAMapping,
                                                                                                                                                                             TriFunction<A,​B,​C,​GroupKeyB_> groupKeyBMapping,
                                                                                                                                                                             TriFunction<A,​B,​C,​GroupKeyC_> groupKeyCMapping,
                                                                                                                                                                             TriFunction<A,​B,​C,​GroupKeyD_> groupKeyDMapping)

      Description copied from interface: `TriConstraintStream`
      Convert the `TriConstraintStream` to a `QuadConstraintStream`, consisting of unique tuples with four facts.

      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. The third fact is the return value of the third group key mapping function, applied on all incoming tuples with the same first fact. The fourth fact is the return value of the fourth group key mapping function, applied on all incoming tuples with the same first fact.

      Specified by:
        `groupBy` in interface `TriConstraintStream<Solution_,​A,​B>`
      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
        `GroupKeyC_` - the type of the third fact in the destination `QuadConstraintStream`'s tuple
        `GroupKeyD_` - 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
        `groupKeyCMapping` - never null, function to convert the original tuple into a third fact
        `groupKeyDMapping` - never null, function to convert the original tuple into a fourth fact
      Returns:
        never null

    - #### map

          public <ResultA_> UniConstraintStream<ResultA_> map​(TriFunction<A,​B,​C,​ResultA_> mapping)

      Description copied from interface: `TriConstraintStream`
      As defined by `UniConstraintStream.map(Function)`.
      Specified by:
        `map` in interface `TriConstraintStream<Solution_,​A,​B>`
      Type Parameters:
        `ResultA_` - the type of the only fact in the resulting `UniConstraintStream`'s tuple
      Parameters:
        `mapping` - never null, function to convert the original tuple into the new tuple
      Returns:
        never null

    - #### impactScore

          protected Constraint impactScore​(String constraintPackage,
                                           String constraintName,
                                           Score<?> constraintWeight,
                                           ScoreImpactType impactType)

      Specified by:
        `impactScore` in class `AbstractConstraintStream<Solution_>`

    - #### impactScore

          public Constraint impactScore​(String constraintPackage,
                                        String constraintName,
                                        Score<?> constraintWeight,
                                        ToIntTriFunction<A,​B,​C> matchWeigher,
                                        ScoreImpactType impactType)

      Specified by:
        `impactScore` in interface `InnerTriConstraintStream<Solution_,​A,​B>`

    - #### impactScoreLong

          public Constraint impactScoreLong​(String constraintPackage,
                                            String constraintName,
                                            Score<?> constraintWeight,
                                            ToLongTriFunction<A,​B,​C> matchWeigher,
                                            ScoreImpactType impactType)

      Specified by:
        `impactScoreLong` in interface `InnerTriConstraintStream<Solution_,​A,​B>`

    - #### impactScoreBigDecimal

          public Constraint impactScoreBigDecimal​(String constraintPackage,
                                                  String constraintName,
                                                  Score<?> constraintWeight,
                                                  TriFunction<A,​B,​C,​BigDecimal> matchWeigher,
                                                  ScoreImpactType impactType)

      Specified by:
        `impactScoreBigDecimal` in interface `InnerTriConstraintStream<Solution_,​A,​B>`

    - #### impactScoreConfigurable

          protected Constraint impactScoreConfigurable​(String constraintPackage,
                                                       String constraintName,
                                                       ScoreImpactType impactType)

      Specified by:
        `impactScoreConfigurable` in class `AbstractConstraintStream<Solution_>`

    - #### impactScoreConfigurable

          public Constraint impactScoreConfigurable​(String constraintPackage,
                                                    String constraintName,
                                                    ToIntTriFunction<A,​B,​C> matchWeigher,
                                                    ScoreImpactType impactType)

      Specified by:
        `impactScoreConfigurable` in interface `InnerTriConstraintStream<Solution_,​A,​B>`

    - #### impactScoreConfigurableLong

          public Constraint impactScoreConfigurableLong​(String constraintPackage,
                                                        String constraintName,
                                                        ToLongTriFunction<A,​B,​C> matchWeigher,
                                                        ScoreImpactType impactType)

      Specified by:
        `impactScoreConfigurableLong` in interface `InnerTriConstraintStream<Solution_,​A,​B>`

    - #### impactScoreConfigurableBigDecimal

          public Constraint impactScoreConfigurableBigDecimal​(String constraintPackage,
                                                              String constraintName,
                                                              TriFunction<A,​B,​C,​BigDecimal> matchWeigher,
                                                              ScoreImpactType impactType)

      Specified by:
        `impactScoreConfigurableBigDecimal` in interface `InnerTriConstraintStream<Solution_,​A,​B>`

    - #### getLeftHandSide

          public abstract TriLeftHandSide<A,​B,​C> getLeftHandSide()