- Direct Known Subclasses:
- Precondition.BooleanPrecondition, Precondition.NumericComparisonPrecondition, Precondition.StringHashPrecondition
public abstract class Precondition
extends java.lang.Object
A Precondition is a boolean condition that must be true if a pattern is to match (but in general
is not a sufficient condition for the pattern to match).
Preconditions may be defined in terms of "characteristics": that is, properties of the item
being matched.
When an item is matched against a RuleChain to find the best matching rule, subexpressions used
by more than one rule may be evaluated as characteristics, so they are not evaluated repeatedly.
Preconditions may either be local to one rule, or shared by multiple rules. When preconditions
are shared by multiple rules, evaluating it for one rule may ensure that the patterns for other
rules do not need to be evaluated.