org.modeshape.jcr.query.xpath
Class XPath.NameTest
java.lang.Object
org.modeshape.jcr.query.xpath.XPath.Component
org.modeshape.jcr.query.xpath.XPath.NodeTest
org.modeshape.jcr.query.xpath.XPath.NameTest
- Enclosing class:
- XPath
public static class XPath.NameTest
- extends XPath.NodeTest
XPath.NameTest
public XPath.NameTest(String prefixTest,
String localTest)
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 nulllocal
- 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
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2008-2013 JBoss, a division of Red Hat. All Rights Reserved.