class ScoreContext<Score_ extends Score<Score_>> {

    private final AbstractScoreInliner<Score_> parent;
    protected final Constraint constraint;
    protected final Score_ constraintWeight;
    protected final boolean constraintMatchEnabled;

    protected ScoreContext(AbstractScoreInliner<Score_> parent, Constraint constraint, Score_ constraintWeight) {
        this.parent = parent;
        this.constraint = constraint;
        this.constraintWeight = constraintWeight;
        this.constraintMatchEnabled = parent.constraintMatchEnabled;
    }

    public Constraint getConstraint() {
        return constraint;
    }

    public Score_ getConstraintWeight() {
        return constraintWeight;
    }

    public boolean isConstraintMatchEnabled() {
        return constraintMatchEnabled;
    }

    protected UndoScoreImpacter impactWithConstraintMatch(UndoScoreImpacter undoScoreImpact, Score_ score,
            JustificationsSupplier justificationsSupplier) {<FILL_FUNCTION_BODY>}

}

        Runnable undoConstraintMatch = parent.addConstraintMatch(constraint, constraintWeight, score, justificationsSupplier);
        return () -> {
            undoScoreImpact.run();
            undoConstraintMatch.run();
        };
    
<no_super_class>