org.optaplanner.core.api.score.stream.quad

## Interface QuadConstraintStream<A,B,C,D>

- Type Parameters:
    `A` - the type of the first matched fact (either a problem fact or a `planning entity`)
    `B` - the type of the second matched fact (either a problem fact or a `planning entity`)
    `C` - the type of the third matched fact (either a problem fact or a `planning entity`)
    `D` - the type of the fourth matched fact (either a problem fact or a `planning entity`)
  All Superinterfaces:
    ConstraintStream
  All Known Subinterfaces:
    InnerQuadConstraintStream<A,B,C,D>
  All Known Implementing Classes:
    DroolsAbstractQuadConstraintStream, DroolsFilterQuadConstraintStream, DroolsJoinQuadConstraintStream, DroolsScoringQuadConstraintStream

      public interface QuadConstraintStream<A,B,C,D>
      extends ConstraintStream

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

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `QuadConstraintStream<A,B,C,D>` | `filter(QuadPredicate<A,B,C,D> predicate)` Exhaustively test each tuple of facts against the `QuadPredicate` and match if `QuadPredicate.test(Object, Object, Object, Object)` returns true.
    `default Constraint` | `penalize(String constraintName, Score<?> constraintWeight, ToIntQuadFunction<A,B,C,D> matchWeigher)` Negatively impact the `Score`: subtract the constraintWeight multiplied by the match weight.
    `Constraint` | `penalize(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntQuadFunction<A,B,C,D> matchWeigher)` As defined by `penalize(String, Score, ToIntQuadFunction)`.
    `default Constraint` | `penalizeBigDecimal(String constraintName, Score<?> constraintWeight, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)` Negatively impact the `Score`: subtract the constraintWeight multiplied by the match weight.
    `Constraint` | `penalizeBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)` As defined by `penalizeBigDecimal(String, Score, QuadFunction)`.
    `Constraint` | `penalizeConfigurable(String constraintPackage, String constraintName, ToIntQuadFunction<A,B,C,D> matchWeigher)` As defined by `penalizeConfigurable(String, ToIntQuadFunction)`.
    `default Constraint` | `penalizeConfigurable(String constraintName, ToIntQuadFunction<A,B,C,D> matchWeigher)` Negatively impact the `Score`: subtract the `ConstraintWeight` multiplied by the match weight.
    `default Constraint` | `penalizeConfigurableBigDecimal(String constraintName, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)` Negatively impact the `Score`: subtract the `ConstraintWeight` multiplied by the match weight.
    `Constraint` | `penalizeConfigurableBigDecimal(String constraintPackage, String constraintName, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)` As defined by `penalizeConfigurableBigDecimal(String, QuadFunction)`.
    `Constraint` | `penalizeConfigurableLong(String constraintPackage, String constraintName, ToLongQuadFunction<A,B,C,D> matchWeigher)` As defined by `penalizeConfigurableLong(String, ToLongQuadFunction)`.
    `default Constraint` | `penalizeConfigurableLong(String constraintName, ToLongQuadFunction<A,B,C,D> matchWeigher)` Negatively impact the `Score`: subtract the `ConstraintWeight` multiplied by the match weight.
    `default Constraint` | `penalizeLong(String constraintName, Score<?> constraintWeight, ToLongQuadFunction<A,B,C,D> matchWeigher)` Negatively impact the `Score`: subtract the constraintWeight multiplied by the match weight.
    `Constraint` | `penalizeLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongQuadFunction<A,B,C,D> matchWeigher)` As defined by `penalizeLong(String, Score, ToLongQuadFunction)`.
    `default Constraint` | `reward(String constraintName, Score<?> constraintWeight, ToIntQuadFunction<A,B,C,D> matchWeigher)` Positively impact the `Score`: add the constraintWeight multiplied by the match weight.
    `Constraint` | `reward(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntQuadFunction<A,B,C,D> matchWeigher)` As defined by `reward(String, Score, ToIntQuadFunction)`.
    `default Constraint` | `rewardBigDecimal(String constraintName, Score<?> constraintWeight, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)` Positively impact the `Score`: add the constraintWeight multiplied by the match weight.
    `Constraint` | `rewardBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)` As defined by `rewardBigDecimal(String, Score, QuadFunction)`.
    `Constraint` | `rewardConfigurable(String constraintPackage, String constraintName, ToIntQuadFunction<A,B,C,D> matchWeigher)` As defined by `rewardConfigurable(String, ToIntQuadFunction)`.
    `default Constraint` | `rewardConfigurable(String constraintName, ToIntQuadFunction<A,B,C,D> matchWeigher)` Positively impact the `Score`: add the `ConstraintWeight` multiplied by the match weight.
    `default Constraint` | `rewardConfigurableBigDecimal(String constraintName, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)` Positively impact the `Score`: add the `ConstraintWeight` multiplied by the match weight.
    `Constraint` | `rewardConfigurableBigDecimal(String constraintPackage, String constraintName, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)` As defined by `rewardConfigurableBigDecimal(String, QuadFunction)`.
    `Constraint` | `rewardConfigurableLong(String constraintPackage, String constraintName, ToLongQuadFunction<A,B,C,D> matchWeigher)` As defined by `rewardConfigurableLong(String, ToLongQuadFunction)`.
    `default Constraint` | `rewardConfigurableLong(String constraintName, ToLongQuadFunction<A,B,C,D> matchWeigher)` Positively impact the `Score`: add the `ConstraintWeight` multiplied by the match weight.
    `default Constraint` | `rewardLong(String constraintName, Score<?> constraintWeight, ToLongQuadFunction<A,B,C,D> matchWeigher)` Positively impact the `Score`: add the constraintWeight multiplied by the match weight.
    `Constraint` | `rewardLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongQuadFunction<A,B,C,D> matchWeigher)` As defined by `rewardLong(String, Score, ToLongQuadFunction)`.

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

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

- - ### Method Detail

    - #### filter

          QuadConstraintStream<A,B,C,D> filter(QuadPredicate<A,B,C,D> predicate)

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

      Important: This is slower and less scalable than `TriConstraintStream.join(UniConstraintStream, QuadJoiner)` with a proper `QuadJoiner` predicate (such as `Joiners.equal(TriFunction, 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,
                                      ToIntQuadFunction<A,B,C,D> 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, ToLongQuadFunction)` or `penalizeBigDecimal(String, Score, QuadFunction)` 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,
                              ToIntQuadFunction<A,B,C,D> matchWeigher)

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

    - #### penalizeLong

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

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

    - #### penalizeBigDecimal

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

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

    - #### penalizeConfigurable

          default Constraint penalizeConfigurable(String constraintName,
                                                  ToIntQuadFunction<A,B,C,D> 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, ToLongQuadFunction)` or `penalizeConfigurableBigDecimal(String, QuadFunction)` 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,
                                          ToIntQuadFunction<A,B,C,D> matchWeigher)

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

    - #### penalizeConfigurableLong

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

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

    - #### penalizeConfigurableBigDecimal

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

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

    - #### reward

          default Constraint reward(String constraintName,
                                    Score<?> constraintWeight,
                                    ToIntQuadFunction<A,B,C,D> 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, ToLongQuadFunction)` or `rewardBigDecimal(String, Score, QuadFunction)` 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,
                            ToIntQuadFunction<A,B,C,D> matchWeigher)

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

    - #### rewardLong

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

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

    - #### rewardBigDecimal

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

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

    - #### rewardConfigurable

          default Constraint rewardConfigurable(String constraintName,
                                                ToIntQuadFunction<A,B,C,D> 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, ToLongQuadFunction)` or `rewardConfigurableBigDecimal(String, QuadFunction)` 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,
                                        ToIntQuadFunction<A,B,C,D> matchWeigher)

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

    - #### rewardConfigurableLong

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

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

    - #### rewardConfigurableBigDecimal

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

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

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