class FilteredRuleSet extends java.lang.Object
A RuleSet implementation that is a Decorator for another RuleSet, but provides
the ability to filter included and excluded rules within that RuleSet.
If a Rule matches both an include and an exclude, then the exclude takes precedence, i.e. the
Rule is NOT includes in the result from getRules().
| Constructor and description |
|---|
FilteredRuleSet
(RuleSet ruleSet)Construct a new instance on the specified RuleSet |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
addExclude(java.lang.String exclude)Add an exclude criteria. |
|
void |
addInclude(java.lang.String include)Add an include criteria. |
|
java.util.List |
getRules()Return the List of Rules that match the include(s) (if specified) AND DO NOT match any exclude(s) specified. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Construct a new instance on the specified RuleSet
ruleset - - the RuleSet to be filtered (decorated); must not be null.Add an exclude criteria.
exclude - - the exclude specification, which is compared against the ids of all of the Rules
within the underlying RuleSet. Any matching Rules are excluded in the result from getRules().
The exclude value must not be null or empty.Add an include criteria.
include - - the include specification, which is compared against the ids of all of the Rules
within the underlying RuleSet. Only matching Rules are included in the result from getRules().
The include value must not be null or empty.Return the List of Rules that match the include(s) (if specified) AND DO NOT match any exclude(s) specified.