optaplanner-core/src/main/java/org/optaplanner/core/api/score/buildin/simple/SimpleScoreHolder.java
@Override
    public void configureConstraintWeight(Rule rule, SimpleScore constraintWeight) {
        super.configureConstraintWeight(rule, constraintWeight);
        BiConsumer<RuleContext, Integer> matchExecutor;
        if (constraintWeight.equals(SimpleScore.ZERO)) {
            matchExecutor = (RuleContext kcontext, Integer matchWeight) -> {};
        } else {
            matchExecutor = (RuleContext kcontext, Integer matchWeight)
                    -> addConstraintMatch(kcontext, constraintWeight.getScore() * matchWeight);
        }
        matchExecutorByNumberMap.put(rule, matchExecutor);
    }
@Override
    public void configureConstraintWeight(Rule rule, SimpleScore constraintWeight) {
        super.configureConstraintWeight(rule, constraintWeight);
        BiConsumer<RuleContext, Integer> matchExecutor;
        if (constraintWeight.equals(SimpleScore.ZERO)) {
            matchExecutor = (RuleContext kcontext, Integer matchWeight) -> {};
        } else {
            matchExecutor = (RuleContext kcontext, Integer matchWeight)
                    -> addConstraintMatch(kcontext, constraintWeight.getScore() * matchWeight);
        }
        matchExecutorByNumberMap.put(rule, matchExecutor);
    }
@ Override public void configureConstraintWeight ( Rule rule , SimpleScore constraintWeight ) { super . configureConstraintWeight ( rule , constraintWeight ) ; BiConsumer < RuleContext , Integer > matchExecutor ; if ( constraintWeight . equals ( SimpleScore . ZERO ) ) { matchExecutor = ( RuleContext kcontext , Integer matchWeight ) -> { } ; } else { matchExecutor = ( RuleContext kcontext , Integer matchWeight ) -> addConstraintMatch ( kcontext , constraintWeight . getScore ( ) * matchWeight ) ; } matchExecutorByNumberMap . put ( rule , matchExecutor ) ; }
************************************************************************
************************************************************************