net.sf.saxon.trans
public final class Rule extends Object implements Serializable
| Constructor Summary | |
|---|---|
| Rule(Pattern p, RuleTarget o, int prec, double prio, int seq)
Create a Rule.
| |
| Rule(Rule r)
Copy a rule, including the chain of rules linked to it | |
| Method Summary | |
|---|---|
| int | compareComputedRank(Rule other)
Rules have an ordering, based on their precedence and priority. |
| int | compareRank(Rule other)
Rules have an ordering, based on their precedence and priority. |
| RuleTarget | getAction() |
| Rule | getNext() |
| Pattern | getPattern() |
| int | getPrecedence() |
| double | getPriority() |
| int | getRank() |
| int | getSequence() |
| boolean | isAlwaysMatches() |
| void | setAction(RuleTarget action) |
| void | setAlwaysMatches(boolean matches) |
| void | setNext(Rule next) |
| void | setRank(int rank) |
Parameters: p the pattern that this rule matches o the object invoked by this rule (usually a Template) prec the precedence of the rule prio the priority of the rule seq a sequence number for ordering of rules
Parameters: r the rule to be copied
Parameters: other Another rule whose ordering rank is to be compared with this one
Returns: <0 if this rule has lower rank, that is if it has lower precedence or equal precedence and lower priority. 0 if the two rules have equal precedence and priority. >0 if this rule has higher rank in precedence/priority order
Parameters: other Another rule whose ordering rank is to be compared with this one
Returns: <0 if this rule has lower rank, that is if it has lower precedence or equal precedence and lower priority. 0 if the two rules have equal precedence and priority. >0 if this rule has higher rank in precedence/priority order