KeyPattern
Date: 2016-07-03

com.icl.saxon.pattern

## Class KeyPattern

- java.lang.Object
- - com.icl.saxon.pattern.Pattern
  - - com.icl.saxon.pattern.KeyPattern

-     public final class KeyPattern
      extends Pattern

  A KeyPattern is a pattern of the form key(keyname, keyvalue)

- - ### Field Summary

    - ### Fields inherited from class com.icl.saxon.pattern.Pattern

      `originalText, staticContext`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `KeyPattern(int namecode, java.lang.String value)` Constructor

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `matches(NodeInfo e, Context c)` Determine whether this Pattern matches the given Node.

    - ### Methods inherited from class com.icl.saxon.pattern.Pattern

      `getDefaultPriority, getFingerprint, getLineNumber, getNodeType, getStaticContext, getSystemId, make, setOriginalText, setStaticContext, simplify, toString`

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

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

- - ### Constructor Detail

    - #### KeyPattern

          public KeyPattern(int namecode,
                    java.lang.String value)

      Constructor
      Parameters:
        `name` - the name of the key
        `value` - the value of the key

  - ### Method Detail

    - #### matches

          public boolean matches(NodeInfo e,
                        Context c)
                          throws XPathException

      Determine whether this Pattern matches the given Node.
      Specified by:
        `matches` in class `Pattern`
      Parameters:
        `e` - The NodeInfo representing the Element or other node to be tested against the Pattern
        `c` - The context in which the match is to take place. Only relevant if the pattern uses variables.
      Returns:
        true if the node matches the Pattern, false otherwise
      Throws:
        `XPathException`