Package com.saxonica.ee.trans

## Class RuleEE

- java.lang.Object
- - net.sf.saxon.trans.rules.Rule
  - - com.saxonica.ee.trans.RuleEE

-     public class RuleEE
      extends Rule

  A Rule with associated preconditions

- - ### Field Summary

    - ### Fields inherited from class net.sf.saxon.trans.rules.Rule

      `action, minImportPrecedence, next, part, pattern, precedence, priority, sequence`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `RuleEE()` |
    `RuleEE​(Pattern p, RuleTarget o, int prec, int min, double prio, int seq, int part)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addPrecondition​(Precondition condition)` | Add a precondition for this rule
    `boolean` | `checkPreconditions​(PreconditionMatcher state)` | Check that all preconditions for this rule are satisfied
    `Rule` | `copy​(boolean copyChain)` |
    `void` | `exportOtherProperties​(ExpressionPresenter out)` | Add other exported properties as required
    `java.util.List<Precondition>` | `getPreconditions()` | Get the preconditions for this rule

    - ### Methods inherited from class net.sf.saxon.trans.rules.Rule

      `compareComputedRank, compareRank, copyFrom, export, getAction, getMinImportPrecedence, getNext, getPartNumber, getPattern, getPrecedence, getPriority, getRank, getSequence, isAlwaysMatches, matches, setAction, setAlwaysMatches, setNext, setPattern, setRank`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RuleEE

          public RuleEE()

    - #### RuleEE

          public RuleEE​(Pattern p,
                        RuleTarget o,
                        int prec,
                        int min,
                        double prio,
                        int seq,
                        int part)

  - ### Method Detail

    - #### copy

          public Rule copy​(boolean copyChain)

      Overrides:
        `copy` in class `Rule`

    - #### getPreconditions

          public java.util.List<Precondition> getPreconditions()

      Get the preconditions for this rule
      Returns:
        a list of preconditions that must be satisfied if this rule is to match

    - #### addPrecondition

          public void addPrecondition​(Precondition condition)

      Add a precondition for this rule
      Parameters:
        `condition` - a precondition that must be satisfied if this rule is to match

    - #### checkPreconditions

          public boolean checkPreconditions​(PreconditionMatcher state)
                                     throws XPathException

      Check that all preconditions for this rule are satisfied
      Parameters:
        `state` - holds the state for matching all rules on a rule-chain, including values of common subexpressions
      Returns:
        true if all preconditions are satisfied
      Throws:
        `XPathException` - if evaluation of a precondition fails

    - #### exportOtherProperties

          public void exportOtherProperties​(ExpressionPresenter out)
                                     throws XPathException

      Description copied from class: `Rule`
      Add other exported properties as required
      Overrides:
        `exportOtherProperties` in class `Rule`
      Parameters:
        `out` - the export destination
      Throws:
        `XPathException`