org.optaplanner.core.impl.score.stream.drools.quad

## Class DroolsAbstractQuadConstraintStream<Solution_,A,B,C,D>

- 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.quad.DroolsAbstractQuadConstraintStream<Solution_,A,B,C,D>

- All Implemented Interfaces:
    ConstraintStream, QuadConstraintStream<A,B,C,D>, InnerQuadConstraintStream<A,B,C,D>
  Direct Known Subclasses:
    DroolsFilterQuadConstraintStream, DroolsJoinQuadConstraintStream, DroolsScoringQuadConstraintStream

      public abstract class DroolsAbstractQuadConstraintStream<Solution_,A,B,C,D>
      extends DroolsAbstractConstraintStream<Solution_>
      implements InnerQuadConstraintStream<A,B,C,D>

- - ### Field Summary

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

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

      `constraintFactory`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete 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.
    `abstract DroolsQuadCondition<A,B,C,D>` | `getCondition()`
    `List<DroolsFromUniConstraintStream<Solution_,Object>>` | `getFromStreamList()`
    `protected Constraint` | `impactScore(String constraintPackage, String constraintName, Score<?> constraintWeight, boolean positive)`
    `Constraint` | `impactScore(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntQuadFunction<A,B,C,D> matchWeigher, boolean positive)`
    `Constraint` | `impactScoreBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, QuadFunction<A,B,C,D,BigDecimal> matchWeigher, boolean positive)`
    `protected Constraint` | `impactScoreConfigurable(String constraintPackage, String constraintName, boolean positive)`
    `Constraint` | `impactScoreConfigurable(String constraintPackage, String constraintName, ToIntQuadFunction<A,B,C,D> matchWeigher, boolean positive)`
    `Constraint` | `impactScoreConfigurableBigDecimal(String constraintPackage, String constraintName, QuadFunction<A,B,C,D,BigDecimal> matchWeigher, boolean positive)`
    `Constraint` | `impactScoreConfigurableLong(String constraintPackage, String constraintName, ToLongQuadFunction<A,B,C,D> matchWeigher, boolean positive)`
    `Constraint` | `impactScoreLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongQuadFunction<A,B,C,D> matchWeigher, boolean positive)`

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

      `addChildStream, buildConstraint, buildConstraintConfigurable, createRuleItemBuilders, 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.quad.InnerQuadConstraintStream

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

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

      `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 DroolsAbstractQuadConstraintStream<Solution_,A,B,C,D> parent

  - ### Constructor Detail

    - #### DroolsAbstractQuadConstraintStream

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

  - ### Method Detail

    - #### filter

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

      Description copied from interface: `QuadConstraintStream`
      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.

      Specified by:
        `filter` in interface `QuadConstraintStream<A,B,C,D>`
      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,
                                        ToIntQuadFunction<A,B,C,D> matchWeigher,
                                        boolean positive)

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

    - #### impactScoreLong

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

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

    - #### impactScoreBigDecimal

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

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

    - #### 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,
                                                    ToIntQuadFunction<A,B,C,D> matchWeigher,
                                                    boolean positive)

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

    - #### impactScoreConfigurableLong

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

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

    - #### impactScoreConfigurableBigDecimal

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

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

    - #### getFromStreamList

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

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

    - #### getCondition

          public abstract DroolsQuadCondition<A,B,C,D> getCondition()

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