Ejemplo n.º 1
0
 private IntConstraintMatchTotal findIntConstraintMatchTotal(
     RuleContext kcontext, int scoreLevel) {
   Rule rule = kcontext.getRule();
   String constraintPackage = rule.getPackageName();
   String constraintName = rule.getName();
   List<Object> key = Arrays.<Object>asList(constraintPackage, constraintName, scoreLevel);
   IntConstraintMatchTotal matchTotal = (IntConstraintMatchTotal) constraintMatchTotalMap.get(key);
   if (matchTotal == null) {
     matchTotal = new IntConstraintMatchTotal(constraintPackage, constraintName, scoreLevel);
     constraintMatchTotalMap.put(key, matchTotal);
   }
   return matchTotal;
 }