Code example for Multiset

Methods: count

0
  public Collection<Rule> rules() {
    return rules.elementSet();
  } 
 
  public int countRule(Rule rule) {
    return rules.count(rule);
  } 
 
  public static class Rule { 
 
    private RuleKey ruleKey;
    private String name;
 
    public Rule(RuleKey ruleKey, String name) {
      this.ruleKey = ruleKey;
      this.name = name;
    } 
 
    public RuleKey ruleKey() { 
      return ruleKey;