Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.novell.xsl.process
Class RuleMap

    java.lang.Object
      com.novell.xsl.process.RuleMap

    public class RuleMap

extends Object

A rule map organized for pattern matching.

The rule map automatically optimizes its internal storage before doing any matching. This optimization may be time consuming for a large maps, so there is a method available to force the optimization to happen up front.

Constructor Summary
`RuleMap()`

Method Summary
`void` | `addNamed(ExpandedQName targetName, Rule rule)` Adds the specified rule with the specified target name to this rule map.
`void` | `addWildcard(Rule rule)` Adds the specified wildcard rule to this rule map.
`void` | `dump(PrintWriter out, int indent)` Dumps this object to the specified output stream.
`Rule[]` | `getRules(ExpandedQName targetName)` Optimizes this rule map for matching (if it isn't already optimized) and returns the optimized rules for the specified target name.
`void` | `optimize()` Optimizes this rule map for matching.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RuleMap

    public RuleMap()

Method Detail

### addNamed

    public void addNamed(ExpandedQName targetName,
                         Rule rule)

  Adds the specified rule with the specified target name to this rule map. This method causes this rule map to become unoptimized.

  Parameters:
    `targetName` - the name of the rule's target
    `rule` - the rule to be added

### addWildcard

    public void addWildcard(Rule rule)

  Adds the specified wildcard rule to this rule map. This method causes this rule map to become unoptimized.

  Parameters:
    `rule` - the wildcard rule to be added

### getRules

    public Rule[] getRules(ExpandedQName targetName)

  Optimizes this rule map for matching (if it isn't already optimized) and returns the optimized rules for the specified target name. The returned rules are sorted according to the rules' `compareTo` method. The returned array, and the rules in the array, must not be modified even though there is no enforcement mechanism.

  Parameters:
    `targetName` - the desired target name
  Returns:
    this rule map's optimized rules for the named target
  See Also:
    `Rule.compareTo(java.lang.Object)`

### optimize

    public void optimize()

  Optimizes this rule map for matching.

### dump

    public void dump(PrintWriter out,
                     int indent)

  Dumps this object to the specified output stream.

  Parameters:
    `out` - the output stream to write to
    `indent` - number of tabs to indent

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD