Code example for Multiset

Methods: count

  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; = name;
    public RuleKey ruleKey() { 
      return ruleKey;
Connect your IDE to all the code out there  Get Codota for Java