Class DroolsScoringBiConstraintStream<Solution_,A,B>
- 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.bi.DroolsAbstractBiConstraintStream<Solution_,A,B>
-
- org.optaplanner.core.impl.score.stream.drools.bi.DroolsScoringBiConstraintStream<Solution_,A,B>
-
- All Implemented Interfaces:
BiConstraintStream<A,B>
,ConstraintStream
,InnerBiConstraintStream<A,B>
public final class DroolsScoringBiConstraintStream<Solution_,A,B> extends DroolsAbstractBiConstraintStream<Solution_,A,B>
-
-
Field Summary
-
Fields inherited from class org.optaplanner.core.impl.score.stream.drools.common.DroolsAbstractConstraintStream
constraintFactory
-
-
Constructor Summary
Constructors Constructor Description DroolsScoringBiConstraintStream(DroolsConstraintFactory<Solution_> constraintFactory, DroolsAbstractBiConstraintStream<Solution_,A,B> parent)
DroolsScoringBiConstraintStream(DroolsConstraintFactory<Solution_> constraintFactory, DroolsAbstractBiConstraintStream<Solution_,A,B> parent, BiFunction<A,B,BigDecimal> bigDecimalMatchWeigher)
DroolsScoringBiConstraintStream(DroolsConstraintFactory<Solution_> constraintFactory, DroolsAbstractBiConstraintStream<Solution_,A,B> parent, ToIntBiFunction<A,B> intMatchWeigher)
DroolsScoringBiConstraintStream(DroolsConstraintFactory<Solution_> constraintFactory, DroolsAbstractBiConstraintStream<Solution_,A,B> parent, ToLongBiFunction<A,B> longMatchWeigher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<org.drools.model.RuleItemBuilder<?>>
createRuleItemBuilders(DroolsConstraint<?> constraint, org.drools.model.Global<? extends AbstractScoreHolder<?>> scoreHolderGlobal)
Assemble elements of the rule that will process this stream and turn it into a constraint match.DroolsBiCondition<A,B,?>
getCondition()
Class[]
getExpectedJustificationTypes()
As defined byDroolsRuleStructure.getExpectedJustificationTypes()
.protected DroolsAbstractConstraintStream<Solution_>
getParent()
String
toString()
-
Methods inherited from class org.optaplanner.core.impl.score.stream.drools.bi.DroolsAbstractBiConstraintStream
filter, getCardinality, getFromStreamList, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, ifExists, ifNotExists, impactScore, impactScore, impactScoreBigDecimal, impactScoreConfigurable, impactScoreConfigurable, impactScoreConfigurableBigDecimal, impactScoreConfigurableLong, impactScoreLong, join
-
Methods inherited from class org.optaplanner.core.impl.score.stream.drools.common.DroolsAbstractConstraintStream
addChildStream, buildConstraint, buildConstraintConfigurable, getChildStreams, getConstraintFactory
-
Methods inherited from class org.optaplanner.core.impl.score.stream.common.AbstractConstraintStream
buildConstraintWeightExtractor, buildConstraintWeightExtractor, impact, penalize, penalizeConfigurable, reward, rewardConfigurable
-
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.bi.BiConstraintStream
ifExists, ifExists, ifExists, ifExists, ifNotExists, ifNotExists, ifNotExists, ifNotExists, impact, impactBigDecimal, impactConfigurable, impactConfigurableBigDecimal, impactConfigurableLong, impactLong, join, join, join, join, join, join, join, penalize, penalizeBigDecimal, penalizeConfigurable, penalizeConfigurableBigDecimal, penalizeConfigurableLong, penalizeLong, reward, rewardBigDecimal, rewardConfigurable, rewardConfigurableBigDecimal, rewardConfigurableLong, rewardLong
-
Methods inherited from interface org.optaplanner.core.api.score.stream.ConstraintStream
getConstraintFactory, impact, impact, penalize, penalize, penalizeConfigurable, penalizeConfigurable, reward, reward, rewardConfigurable, rewardConfigurable
-
Methods inherited from interface org.optaplanner.core.impl.score.stream.bi.InnerBiConstraintStream
impact, impactBigDecimal, impactConfigurable, impactConfigurableBigDecimal, impactConfigurableLong, impactLong, penalize, penalizeBigDecimal, penalizeConfigurable, penalizeConfigurableBigDecimal, penalizeConfigurableLong, penalizeLong, reward, rewardBigDecimal, rewardConfigurable, rewardConfigurableBigDecimal, rewardConfigurableLong, rewardLong
-
-
-
-
Constructor Detail
-
DroolsScoringBiConstraintStream
public DroolsScoringBiConstraintStream(DroolsConstraintFactory<Solution_> constraintFactory, DroolsAbstractBiConstraintStream<Solution_,A,B> parent)
-
DroolsScoringBiConstraintStream
public DroolsScoringBiConstraintStream(DroolsConstraintFactory<Solution_> constraintFactory, DroolsAbstractBiConstraintStream<Solution_,A,B> parent, ToIntBiFunction<A,B> intMatchWeigher)
-
DroolsScoringBiConstraintStream
public DroolsScoringBiConstraintStream(DroolsConstraintFactory<Solution_> constraintFactory, DroolsAbstractBiConstraintStream<Solution_,A,B> parent, ToLongBiFunction<A,B> longMatchWeigher)
-
DroolsScoringBiConstraintStream
public DroolsScoringBiConstraintStream(DroolsConstraintFactory<Solution_> constraintFactory, DroolsAbstractBiConstraintStream<Solution_,A,B> parent, BiFunction<A,B,BigDecimal> bigDecimalMatchWeigher)
-
-
Method Detail
-
createRuleItemBuilders
public List<org.drools.model.RuleItemBuilder<?>> createRuleItemBuilders(DroolsConstraint<?> constraint, org.drools.model.Global<? extends AbstractScoreHolder<?>> scoreHolderGlobal)
Description copied from class:DroolsAbstractConstraintStream
Assemble elements of the rule that will process this stream and turn it into a constraint match. Will be ignored unless on a scoring stream such asDroolsScoringUniConstraintStream
.- Overrides:
createRuleItemBuilders
in classDroolsAbstractConstraintStream<Solution_>
- Parameters:
constraint
- constraint which is being scoredscoreHolderGlobal
- contains the score to be affected- Returns:
- rule representing this constraint stream
-
getCondition
public DroolsBiCondition<A,B,?> getCondition()
- Specified by:
getCondition
in classDroolsAbstractBiConstraintStream<Solution_,A,B>
-
getExpectedJustificationTypes
public Class[] getExpectedJustificationTypes()
Description copied from class:DroolsAbstractConstraintStream
As defined byDroolsRuleStructure.getExpectedJustificationTypes()
. May only be called on scoring streams.- Overrides:
getExpectedJustificationTypes
in classDroolsAbstractConstraintStream<Solution_>
- Returns:
- never null, never empty
-
getParent
protected DroolsAbstractConstraintStream<Solution_> getParent()
- Specified by:
getParent
in classDroolsAbstractBiConstraintStream<Solution_,A,B>
-
-