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

## org.modeshape.jcr.xpath
Class XPath.NameTest

    java.lang.Object
      org.modeshape.jcr.xpath.XPath.Component
          org.modeshape.jcr.xpath.XPath.NodeTest
              org.modeshape.jcr.xpath.XPath.NameTest

Enclosing class:
  XPath

    public static class XPath.NameTest

extends XPath.NodeTest

Constructor Summary
`XPath.NameTest(String prefixTest, String localTest)`

Method Summary
`boolean` | `equals(Object obj)`
`String` | `getLocalTest()`
`String` | `getPrefixTest()`
`int` | `hashCode()`
`boolean` | `isWildcard()` Return whether this represents a wildcard, meaning both `getPrefixTest()` and `getLocalTest()` are null.
`boolean` | `matches(String prefix, String local)` Determine if this name test exactly matches the supplied prefix and local name values.
`String` | `toString()`

Methods inherited from class org.modeshape.jcr.xpath.XPath.Component
`collapse`

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

Constructor Detail

### XPath.NameTest

    public XPath.NameTest(String prefixTest,
                          String localTest)

Method Detail

### getPrefixTest

    public String getPrefixTest()

  Returns:
    the prefix criteria, or null if the prefix criteria is a wildcard

### getLocalTest

    public String getLocalTest()

  Returns:
    the local name criteria, or null if the local name criteria is a wildcard

### matches

    public boolean matches(String prefix,
                           String local)

  Determine if this name test exactly matches the supplied prefix and local name values.

  Parameters:
    `prefix` - the prefix; may be null
    `local` - the local name; may be null
  Returns:
    true if this name matches the supplied values, or false otherwise.

### isWildcard

    public boolean isWildcard()

  Return whether this represents a wildcard, meaning both `getPrefixTest()` and `getLocalTest()` are null.

  Returns:
    true if this is a wildcard name test.

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`
  See Also:
    `Object.hashCode()`

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`
  See Also:
    `Object.equals(java.lang.Object)`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`
  See Also:
    `Object.toString()`

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

Copyright © 2008-2011 JBoss, a division of Red Hat. All Rights Reserved.