Interface WeightedScoreImpacter
-
public interface WeightedScoreImpacterThere are several valid ways how an impacter could be called from a constraint stream:.penalize(..., (int) 1).penalizeLong(..., (int) 1).penalizeLong(..., (long) 1).penalizeBigDecimal(..., (int) 1).penalizeBigDecimal(..., (long) 1).penalizeBigDecimal(..., BigDecimal.ONE)- Plus reward variants of the above.
UnsupportedOperationExceptionfor the method types it doesn't support. The CS API guarantees no types are mixed. For example, aBigDecimalparameter method won't be called on an instance built with anWeightedScoreImpacter.IntImpactFunction.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceWeightedScoreImpacter.BigDecimalImpactFunctionstatic interfaceWeightedScoreImpacter.IntImpactFunctionstatic interfaceWeightedScoreImpacter.LongImpactFunction
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description UndoScoreImpacterimpactScore(int matchWeight, JustificationsSupplier justificationsSupplier)UndoScoreImpacterimpactScore(long matchWeight, JustificationsSupplier justificationsSupplier)UndoScoreImpacterimpactScore(BigDecimal matchWeight, JustificationsSupplier justificationsSupplier)static WeightedScoreImpacterof(WeightedScoreImpacter.BigDecimalImpactFunction impactFunction)static WeightedScoreImpacterof(WeightedScoreImpacter.IntImpactFunction impactFunction)static WeightedScoreImpacterof(WeightedScoreImpacter.LongImpactFunction impactFunction)
-
-
-
Method Detail
-
of
static WeightedScoreImpacter of(WeightedScoreImpacter.IntImpactFunction impactFunction)
-
of
static WeightedScoreImpacter of(WeightedScoreImpacter.LongImpactFunction impactFunction)
-
of
static WeightedScoreImpacter of(WeightedScoreImpacter.BigDecimalImpactFunction impactFunction)
-
impactScore
UndoScoreImpacter impactScore(int matchWeight, JustificationsSupplier justificationsSupplier)
- Parameters:
matchWeight- never nulljustificationsSupplier- never null- Returns:
- never null
-
impactScore
UndoScoreImpacter impactScore(long matchWeight, JustificationsSupplier justificationsSupplier)
- Parameters:
matchWeight- never nulljustificationsSupplier- never null- Returns:
- never null
-
impactScore
UndoScoreImpacter impactScore(BigDecimal matchWeight, JustificationsSupplier justificationsSupplier)
- Parameters:
matchWeight- never nulljustificationsSupplier- never null- Returns:
- never null
-
-