Interface WeightedScoreImpacter<Score_ extends Score<Score_>,Context_ extends ScoreContext<Score_,?>>
-
public interface WeightedScoreImpacter<Score_ extends Score<Score_>,Context_ extends ScoreContext<Score_,?>>There 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.BigDecimalImpactFunction<Score_ extends Score<Score_>,Context_ extends ScoreContext<Score_,?>>static interfaceWeightedScoreImpacter.IntImpactFunction<Score_ extends Score<Score_>,Context_ extends ScoreContext<Score_,?>>static interfaceWeightedScoreImpacter.LongImpactFunction<Score_ extends Score<Score_>,Context_ extends ScoreContext<Score_,?>>
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Context_getContext()UndoScoreImpacterimpactScore(int matchWeight, ConstraintMatchSupplier<Score_> constraintMatchSupplier)UndoScoreImpacterimpactScore(long matchWeight, ConstraintMatchSupplier<Score_> constraintMatchSupplier)UndoScoreImpacterimpactScore(BigDecimal matchWeight, ConstraintMatchSupplier<Score_> constraintMatchSupplier)static <Score_ extends Score<Score_>,Context_ extends ScoreContext<Score_,?>>
WeightedScoreImpacter<Score_,Context_>of(Context_ context, WeightedScoreImpacter.BigDecimalImpactFunction<Score_,Context_> impactFunction)static <Score_ extends Score<Score_>,Context_ extends ScoreContext<Score_,?>>
WeightedScoreImpacter<Score_,Context_>of(Context_ context, WeightedScoreImpacter.IntImpactFunction<Score_,Context_> impactFunction)static <Score_ extends Score<Score_>,Context_ extends ScoreContext<Score_,?>>
WeightedScoreImpacter<Score_,Context_>of(Context_ context, WeightedScoreImpacter.LongImpactFunction<Score_,Context_> impactFunction)
-
-
-
Method Detail
-
of
static <Score_ extends Score<Score_>,Context_ extends ScoreContext<Score_,?>> WeightedScoreImpacter<Score_,Context_> of(Context_ context, WeightedScoreImpacter.IntImpactFunction<Score_,Context_> impactFunction)
-
of
static <Score_ extends Score<Score_>,Context_ extends ScoreContext<Score_,?>> WeightedScoreImpacter<Score_,Context_> of(Context_ context, WeightedScoreImpacter.LongImpactFunction<Score_,Context_> impactFunction)
-
of
static <Score_ extends Score<Score_>,Context_ extends ScoreContext<Score_,?>> WeightedScoreImpacter<Score_,Context_> of(Context_ context, WeightedScoreImpacter.BigDecimalImpactFunction<Score_,Context_> impactFunction)
-
impactScore
UndoScoreImpacter impactScore(int matchWeight, ConstraintMatchSupplier<Score_> constraintMatchSupplier)
- Parameters:
matchWeight- never nullconstraintMatchSupplier- ignored unless constraint match enableds- Returns:
- never null
-
impactScore
UndoScoreImpacter impactScore(long matchWeight, ConstraintMatchSupplier<Score_> constraintMatchSupplier)
- Parameters:
matchWeight- never nullconstraintMatchSupplier- ignored unless constraint match enabled- Returns:
- never null
-
impactScore
UndoScoreImpacter impactScore(BigDecimal matchWeight, ConstraintMatchSupplier<Score_> constraintMatchSupplier)
- Parameters:
matchWeight- never nullconstraintMatchSupplier- ignored unless constraint match enabled- Returns:
- never null
-
getContext
Context_ getContext()
-
-