Package net.sf.saxon.trans.rules

## Class RuleChain

- java.lang.Object
- - net.sf.saxon.trans.rules.RuleChain

-     public class RuleChain
      extends java.lang.Object

  A chain of rules: actually in this incarnation just a pointer to the first rule in the chain, the others being linked together each to the next.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `java.lang.Object` | `optimizationData` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `RuleChain()` | Create an empty rule chain
    `RuleChain​(Rule head)` | Create an rule chain with a give rule as the head of the chain

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `getLength()` | Get the length of the rule chain
    `Rule` | `head()` | Get the first rule in the chain, or null if the chain is empty
    `void` | `setHead​(Rule head)` | Set the first rule in the chain, or null if the chain is empty

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

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

- - ### Field Detail

    - #### optimizationData

          public java.lang.Object optimizationData

  - ### Constructor Detail

    - #### RuleChain

          public RuleChain()

      Create an empty rule chain

    - #### RuleChain

          public RuleChain​(Rule head)

      Create an rule chain with a give rule as the head of the chain
      Parameters:
        `head` - the head of a chain of rules

  - ### Method Detail

    - #### head

          public Rule head()

      Get the first rule in the chain, or null if the chain is empty
      Returns:
        the first rule in the chain, or null if empty

    - #### setHead

          public void setHead​(Rule head)

      Set the first rule in the chain, or null if the chain is empty
      Parameters:
        `head` - the first rule in the chain, or null if empty

    - #### getLength

          public int getLength()

      Get the length of the rule chain
      Returns:
        the number of rules in the chain