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

## Class DroolsConstraint<Solution_>

- java.lang.Object
- - org.optaplanner.core.impl.score.stream.common.AbstractConstraint<Solution_,DroolsConstraintFactory<Solution_>>
  - - org.optaplanner.core.impl.score.stream.drools.DroolsConstraint<Solution_>

- All Implemented Interfaces:
    Constraint

      public class DroolsConstraint<Solution_>
      extends AbstractConstraint<Solution_,DroolsConstraintFactory<Solution_>>

- - ### Field Summary

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

      `constraintFactory, constraintName, constraintPackage, scoreImpactType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DroolsConstraint(DroolsConstraintFactory<Solution_> constraintFactory, String constraintPackage, String constraintName, Function<Solution_,Score<?>> constraintWeightExtractor, ScoreImpactType scoreImpactType, boolean isConstraintWeightConfigurable, List<DroolsFromUniConstraintStream<Solution_,Object>> fromStreamList, DroolsAbstractConstraintStream<Solution_> scoringStream)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.drools.model.Rule` | `createRule(org.drools.model.Global<? extends AbstractScoreHolder<?>> scoreHolderGlobal)`
    `int` | `getExpectedJustificationCount()`
    `Class[]` | `getExpectedJustificationTypes()` As defined by `DroolsRuleStructure.getExpectedJustificationTypes()`.
    `String` | `toString()`

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

      `assertCorrectImpact, assertCorrectImpact, assertCorrectImpact, extractConstraintWeight, getConstraintFactory, getConstraintName, getConstraintPackage, getScoreImpactType`

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

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

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

      `getConstraintId`

- - ### Constructor Detail

    - #### DroolsConstraint

          public DroolsConstraint(DroolsConstraintFactory<Solution_> constraintFactory,
                                  String constraintPackage,
                                  String constraintName,
                                  Function<Solution_,Score<?>> constraintWeightExtractor,
                                  ScoreImpactType scoreImpactType,
                                  boolean isConstraintWeightConfigurable,
                                  List<DroolsFromUniConstraintStream<Solution_,Object>> fromStreamList,
                                  DroolsAbstractConstraintStream<Solution_> scoringStream)

  - ### Method Detail

    - #### createRule

          public org.drools.model.Rule createRule(org.drools.model.Global<? extends AbstractScoreHolder<?>> scoreHolderGlobal)

    - #### getExpectedJustificationTypes

          public Class[] getExpectedJustificationTypes()

      As defined by `DroolsRuleStructure.getExpectedJustificationTypes()`.
      Returns:
        never null, never empty

    - #### getExpectedJustificationCount

          public int getExpectedJustificationCount()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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