Represents a RuleSet. Testing doesn't work for it yet.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@146 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
David Dixon-Peugh
2002-07-01 16:04:50 +00:00
parent 20c2475136
commit efef085489

View File

@ -0,0 +1,36 @@
package net.sourceforge.pmd;
import java.util.Set;
import java.util.List;
import java.util.HashSet;
import java.util.Iterator;
public class RuleSet
{
private Set rules = new HashSet();
public RuleSet() { }
public int size() {
return rules.size();
}
public void addRule( Rule rule ) {
rules.add( rule );
}
public Set getRules() {
return rules;
}
public void apply( List acuList,
RuleContext ctx ) {
Iterator rs = rules.iterator();
while (rs.hasNext()) {
Rule rule = (Rule) rs.next();
rule.apply( acuList, ctx );
}
}
}