Class AbstractConstraintStream<Solution_>
- java.lang.Object
-
- org.optaplanner.core.impl.score.stream.common.AbstractConstraintStream<Solution_>
-
- All Implemented Interfaces:
ConstraintStream
- Direct Known Subclasses:
BavetAbstractConstraintStream
,DroolsAbstractConstraintStream
public abstract class AbstractConstraintStream<Solution_> extends Object implements ConstraintStream
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractConstraintStream(RetrievalSemantics retrievalSemantics)
-
Method Summary
-
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.api.score.stream.ConstraintStream
impact, penalize, penalizeConfigurable, reward, rewardConfigurable
-
-
-
-
Constructor Detail
-
AbstractConstraintStream
protected AbstractConstraintStream(RetrievalSemantics retrievalSemantics)
-
-
Method Detail
-
getRetrievalSemantics
public RetrievalSemantics getRetrievalSemantics()
-
buildConstraintWeightExtractor
protected Function<Solution_,Score<?>> buildConstraintWeightExtractor(String constraintPackage, String constraintName)
-
buildConstraintWeightExtractor
protected Function<Solution_,Score<?>> buildConstraintWeightExtractor(String constraintPackage, String constraintName, Score<?> constraintWeight)
-
getConstraintFactory
public abstract InnerConstraintFactory<Solution_,?> getConstraintFactory()
Description copied from interface:ConstraintStream
TheConstraintFactory
that build this.- Specified by:
getConstraintFactory
in interfaceConstraintStream
- Returns:
- never null
-
penalize
public final Constraint penalize(String constraintPackage, String constraintName, Score<?> constraintWeight)
Description copied from interface:ConstraintStream
As defined byConstraintStream.penalize(String, Score)
.- Specified by:
penalize
in interfaceConstraintStream
- Parameters:
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never null- Returns:
- never null
-
penalizeConfigurable
public final Constraint penalizeConfigurable(String constraintPackage, String constraintName)
Description copied from interface:ConstraintStream
As defined byConstraintStream.penalizeConfigurable(String)
.- Specified by:
penalizeConfigurable
in interfaceConstraintStream
- Parameters:
constraintPackage
- never nullconstraintName
- never null- Returns:
- never null
-
reward
public final Constraint reward(String constraintPackage, String constraintName, Score<?> constraintWeight)
Description copied from interface:ConstraintStream
As defined byConstraintStream.reward(String, Score)
.- Specified by:
reward
in interfaceConstraintStream
- Parameters:
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never null- Returns:
- never null
-
rewardConfigurable
public final Constraint rewardConfigurable(String constraintPackage, String constraintName)
Description copied from interface:ConstraintStream
As defined byConstraintStream.rewardConfigurable(String)
.- Specified by:
rewardConfigurable
in interfaceConstraintStream
- Parameters:
constraintPackage
- never nullconstraintName
- never null- Returns:
- never null
-
impact
public final Constraint impact(String constraintPackage, String constraintName, Score<?> constraintWeight)
Description copied from interface:ConstraintStream
As defined byConstraintStream.impact(String, Score)
.- Specified by:
impact
in interfaceConstraintStream
- Parameters:
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never null- Returns:
- never null
-
impactScore
protected abstract Constraint impactScore(String constraintPackage, String constraintName, Score<?> constraintWeight, ScoreImpactType impactType)
-
impactScoreConfigurable
protected abstract Constraint impactScoreConfigurable(String constraintPackage, String constraintName, ScoreImpactType impactType)
-
-