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:
    DroolsFilterTriConstraintStream, DroolsJoinTriConstraintStream, DroolsScoringTriConstraintStream

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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected DroolsAbstractTriConstraintStream<Solution_,A,B,C>` | `parent`

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

      `constraintFactory`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DroolsAbstractTriConstraintStream(DroolsConstraintFactory<Solution_> constraintFactory, DroolsAbstractTriConstraintStream<Solution_,A,B,C> parent)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract DroolsTriCondition<A,B,C>` | `createCondition()`
    `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.
    `List<DroolsFromUniConstraintStream<Solution_,Object>>` | `getFromStreamList()`
    `protected Constraint` | `impactScore(String constraintPackage, String constraintName, Score<?> constraintWeight, boolean positive)`
    `Constraint` | `impactScore(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntTriFunction<A,B,C> matchWeigher, boolean positive)`
    `Constraint` | `impactScoreBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, TriFunction<A,B,C,BigDecimal> matchWeigher, boolean positive)`
    `protected Constraint` | `impactScoreConfigurable(String constraintPackage, String constraintName, boolean positive)`
    `Constraint` | `impactScoreConfigurable(String constraintPackage, String constraintName, ToIntTriFunction<A,B,C> matchWeigher, boolean positive)`
    `Constraint` | `impactScoreConfigurableBigDecimal(String constraintPackage, String constraintName, TriFunction<A,B,C,BigDecimal> matchWeigher, boolean positive)`
    `Constraint` | `impactScoreConfigurableLong(String constraintPackage, String constraintName, ToLongTriFunction<A,B,C> matchWeigher, boolean positive)`
    `Constraint` | `impactScoreLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongTriFunction<A,B,C> matchWeigher, boolean positive)`

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

      `addChildStream, buildConstraint, buildConstraintConfigurable, buildRule, getChildStreams, getConstraintFactory`

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

      `buildConstraintWeightExtractor, buildConstraintWeightExtractor, penalize, penalizeConfigurable, reward, rewardConfigurable, validateConstraintId`

    - ### 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.impl.score.stream.tri.InnerTriConstraintStream

      `penalize, penalizeBigDecimal, penalizeConfigurable, penalizeConfigurableBigDecimal, penalizeConfigurableLong, penalizeLong, reward, rewardBigDecimal, rewardConfigurable, rewardConfigurableBigDecimal, rewardConfigurableLong, rewardLong`

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

      `penalize, penalizeBigDecimal, penalizeConfigurable, penalizeConfigurableBigDecimal, penalizeConfigurableLong, penalizeLong, reward, rewardBigDecimal, rewardConfigurable, rewardConfigurableBigDecimal, rewardConfigurableLong, rewardLong`

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

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

- - ### Field Detail

    - #### parent

          protected final DroolsAbstractTriConstraintStream<Solution_,A,B,C> parent

  - ### Constructor Detail

    - #### DroolsAbstractTriConstraintStream

          public DroolsAbstractTriConstraintStream(DroolsConstraintFactory<Solution_> constraintFactory,
                                                   DroolsAbstractTriConstraintStream<Solution_,A,B,C> parent)

  - ### 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<A,B,C>`
      Parameters:
        `predicate` - never null
      Returns:
        never null

    - #### impactScore

          protected Constraint impactScore(String constraintPackage,
                                           String constraintName,
                                           Score<?> constraintWeight,
                                           boolean positive)

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

    - #### impactScore

          public Constraint impactScore(String constraintPackage,
                                        String constraintName,
                                        Score<?> constraintWeight,
                                        ToIntTriFunction<A,B,C> matchWeigher,
                                        boolean positive)

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

    - #### impactScoreLong

          public Constraint impactScoreLong(String constraintPackage,
                                            String constraintName,
                                            Score<?> constraintWeight,
                                            ToLongTriFunction<A,B,C> matchWeigher,
                                            boolean positive)

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

    - #### impactScoreBigDecimal

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

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

    - #### impactScoreConfigurable

          protected Constraint impactScoreConfigurable(String constraintPackage,
                                                       String constraintName,
                                                       boolean positive)

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

    - #### impactScoreConfigurable

          public Constraint impactScoreConfigurable(String constraintPackage,
                                                    String constraintName,
                                                    ToIntTriFunction<A,B,C> matchWeigher,
                                                    boolean positive)

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

    - #### impactScoreConfigurableLong

          public Constraint impactScoreConfigurableLong(String constraintPackage,
                                                        String constraintName,
                                                        ToLongTriFunction<A,B,C> matchWeigher,
                                                        boolean positive)

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

    - #### impactScoreConfigurableBigDecimal

          public Constraint impactScoreConfigurableBigDecimal(String constraintPackage,
                                                              String constraintName,
                                                              TriFunction<A,B,C,BigDecimal> matchWeigher,
                                                              boolean positive)

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

    - #### getFromStreamList

          public List<DroolsFromUniConstraintStream<Solution_,Object>> getFromStreamList()

      Specified by:
        `getFromStreamList` in class `DroolsAbstractConstraintStream<Solution_>`

    - #### createCondition

          public abstract DroolsTriCondition<A,B,C> createCondition()

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