public void addHardConstraintMatch ( RuleContext kcontext , BigDecimal hardWeight ) { hardScore = hardScore . add ( hardWeight ) ; registerConstraintMatch ( kcontext , ( ) -> hardScore = hardScore . subtract ( hardWeight ) , ( ) -> HardMediumSoftBigDecimalScore . of ( hardWeight , BigDecimal . ZERO , BigDecimal . ZERO ) ) ; }
Add a hard constraint of specified weighting .