org.optaplanner.core.api.score.stream.tri

## Interface TriConstraintStream<A,B,C>

- Type Parameters:
    `A` - the type of the first fact in the tuple.
    `B` - the type of the second fact in the tuple.
    `C` - the type of the third fact in the tuple.
  All Superinterfaces:
    ConstraintStream
  All Known Subinterfaces:
    InnerTriConstraintStream<A,B,C>
  All Known Implementing Classes:
    BavetAbstractTriConstraintStream, BavetFilterTriConstraintStream, BavetJoinTriConstraintStream, BavetScoringTriConstraintStream, DroolsAbstractTriConstraintStream, DroolsFilterTriConstraintStream, DroolsJoinTriConstraintStream, DroolsScoringTriConstraintStream

      public interface TriConstraintStream<A,B,C>
      extends ConstraintStream

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

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and 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.
    `default Constraint` | `penalize(String constraintName, Score<?> constraintWeight, ToIntTriFunction<A,B,C> matchWeigher)` Negatively impact the `Score`: subtract the constraintWeight multiplied by the match weight.
    `Constraint` | `penalize(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntTriFunction<A,B,C> matchWeigher)` As defined by `penalize(String, Score, ToIntTriFunction)`.
    `default Constraint` | `penalizeBigDecimal(String constraintName, Score<?> constraintWeight, TriFunction<A,B,C,BigDecimal> matchWeigher)` Negatively impact the `Score`: subtract the constraintWeight multiplied by the match weight.
    `Constraint` | `penalizeBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, TriFunction<A,B,C,BigDecimal> matchWeigher)` As defined by `penalizeBigDecimal(String, Score, TriFunction)`.
    `Constraint` | `penalizeConfigurable(String constraintPackage, String constraintName, ToIntTriFunction<A,B,C> matchWeigher)` As defined by `penalizeConfigurable(String, ToIntTriFunction)`.
    `default Constraint` | `penalizeConfigurable(String constraintName, ToIntTriFunction<A,B,C> matchWeigher)` Negatively impact the `Score`: subtract the `ConstraintWeight` multiplied by the match weight.
    `Constraint` | `penalizeConfigurableBigDecimal(String constraintPackage, String constraintName, TriFunction<A,B,C,BigDecimal> matchWeigher)` As defined by `penalizeConfigurableBigDecimal(String, TriFunction)`.
    `default Constraint` | `penalizeConfigurableBigDecimal(String constraintName, TriFunction<A,B,C,BigDecimal> matchWeigher)` Negatively impact the `Score`: subtract the `ConstraintWeight` multiplied by the match weight.
    `Constraint` | `penalizeConfigurableLong(String constraintPackage, String constraintName, ToLongTriFunction<A,B,C> matchWeigher)` As defined by `penalizeConfigurableLong(String, ToLongTriFunction)`.
    `default Constraint` | `penalizeConfigurableLong(String constraintName, ToLongTriFunction<A,B,C> matchWeigher)` Negatively impact the `Score`: subtract the `ConstraintWeight` multiplied by the match weight.
    `default Constraint` | `penalizeLong(String constraintName, Score<?> constraintWeight, ToLongTriFunction<A,B,C> matchWeigher)` Negatively impact the `Score`: subtract the constraintWeight multiplied by the match weight.
    `Constraint` | `penalizeLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongTriFunction<A,B,C> matchWeigher)` As defined by `penalizeLong(String, Score, ToLongTriFunction)`.
    `default Constraint` | `reward(String constraintName, Score<?> constraintWeight, ToIntTriFunction<A,B,C> matchWeigher)` Positively impact the `Score`: add the constraintWeight multiplied by the match weight.
    `Constraint` | `reward(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntTriFunction<A,B,C> matchWeigher)` As defined by `reward(String, Score, ToIntTriFunction)`.
    `default Constraint` | `rewardBigDecimal(String constraintName, Score<?> constraintWeight, TriFunction<A,B,C,BigDecimal> matchWeigher)` Positively impact the `Score`: add the constraintWeight multiplied by the match weight.
    `Constraint` | `rewardBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, TriFunction<A,B,C,BigDecimal> matchWeigher)` As defined by `rewardBigDecimal(String, Score, TriFunction)`.
    `Constraint` | `rewardConfigurable(String constraintPackage, String constraintName, ToIntTriFunction<A,B,C> matchWeigher)` As defined by `rewardConfigurable(String, ToIntTriFunction)`.
    `default Constraint` | `rewardConfigurable(String constraintName, ToIntTriFunction<A,B,C> matchWeigher)` Positively impact the `Score`: add the `ConstraintWeight` multiplied by the match weight.
    `Constraint` | `rewardConfigurableBigDecimal(String constraintPackage, String constraintName, TriFunction<A,B,C,BigDecimal> matchWeigher)` As defined by `rewardConfigurableBigDecimal(String, TriFunction)`.
    `default Constraint` | `rewardConfigurableBigDecimal(String constraintName, TriFunction<A,B,C,BigDecimal> matchWeigher)` Positively impact the `Score`: add the `ConstraintWeight` multiplied by the match weight.
    `Constraint` | `rewardConfigurableLong(String constraintPackage, String constraintName, ToLongTriFunction<A,B,C> matchWeigher)` As defined by `rewardConfigurableLong(String, ToLongTriFunction)`.
    `default Constraint` | `rewardConfigurableLong(String constraintName, ToLongTriFunction<A,B,C> matchWeigher)` Positively impact the `Score`: add the `ConstraintWeight` multiplied by the match weight.
    `default Constraint` | `rewardLong(String constraintName, Score<?> constraintWeight, ToLongTriFunction<A,B,C> matchWeigher)` Positively impact the `Score`: add the constraintWeight multiplied by the match weight.
    `Constraint` | `rewardLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongTriFunction<A,B,C> matchWeigher)` As defined by `rewardLong(String, Score, ToLongTriFunction)`.

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

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

- - ### Method Detail

    - #### filter

          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.

      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.

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

    - #### penalize

          default Constraint penalize(String constraintName,
                                      Score<?> constraintWeight,
                                      ToIntTriFunction<A,B,C> 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, ToLongTriFunction)` or `penalizeBigDecimal(String, Score, TriFunction)` 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,
                              ToIntTriFunction<A,B,C> matchWeigher)

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

    - #### penalizeLong

          default Constraint penalizeLong(String constraintName,
                                          Score<?> constraintWeight,
                                          ToLongTriFunction<A,B,C> 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,
                                  ToLongTriFunction<A,B,C> matchWeigher)

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

    - #### penalizeBigDecimal

          default Constraint penalizeBigDecimal(String constraintName,
                                                Score<?> constraintWeight,
                                                TriFunction<A,B,C,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,
                                        TriFunction<A,B,C,BigDecimal> matchWeigher)

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

    - #### penalizeConfigurable

          default Constraint penalizeConfigurable(String constraintName,
                                                  ToIntTriFunction<A,B,C> 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, ToLongTriFunction)` or `penalizeConfigurableBigDecimal(String, TriFunction)` 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,
                                          ToIntTriFunction<A,B,C> matchWeigher)

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

    - #### penalizeConfigurableLong

          default Constraint penalizeConfigurableLong(String constraintName,
                                                      ToLongTriFunction<A,B,C> 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,
                                              ToLongTriFunction<A,B,C> matchWeigher)

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

    - #### penalizeConfigurableBigDecimal

          default Constraint penalizeConfigurableBigDecimal(String constraintName,
                                                            TriFunction<A,B,C,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,
                                                    TriFunction<A,B,C,BigDecimal> matchWeigher)

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

    - #### reward

          default Constraint reward(String constraintName,
                                    Score<?> constraintWeight,
                                    ToIntTriFunction<A,B,C> 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, ToLongTriFunction)` or `rewardBigDecimal(String, Score, TriFunction)` 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,
                            ToIntTriFunction<A,B,C> matchWeigher)

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

    - #### rewardLong

          default Constraint rewardLong(String constraintName,
                                        Score<?> constraintWeight,
                                        ToLongTriFunction<A,B,C> 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,
                                ToLongTriFunction<A,B,C> matchWeigher)

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

    - #### rewardBigDecimal

          default Constraint rewardBigDecimal(String constraintName,
                                              Score<?> constraintWeight,
                                              TriFunction<A,B,C,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,
                                      TriFunction<A,B,C,BigDecimal> matchWeigher)

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

    - #### rewardConfigurable

          default Constraint rewardConfigurable(String constraintName,
                                                ToIntTriFunction<A,B,C> 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, ToLongTriFunction)` or `rewardConfigurableBigDecimal(String, TriFunction)` 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,
                                        ToIntTriFunction<A,B,C> matchWeigher)

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

    - #### rewardConfigurableLong

          default Constraint rewardConfigurableLong(String constraintName,
                                                    ToLongTriFunction<A,B,C> 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,
                                            ToLongTriFunction<A,B,C> matchWeigher)

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

    - #### rewardConfigurableBigDecimal

          default Constraint rewardConfigurableBigDecimal(String constraintName,
                                                          TriFunction<A,B,C,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,
                                                  TriFunction<A,B,C,BigDecimal> matchWeigher)

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

Copyright © 2006–2019 JBoss by Red Hat. All rights reserved.