Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ANY_LOCALNAME
Special value for the QName local name that will match any local name.
|
static XmlNamespace |
ANY_NAMESPACE
Special value for the QName namespace that will match any namespace.
|
Constructor and Description |
---|
QName(java.lang.String localName) |
QName(XmlNamespace namespace,
java.lang.String localName) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(QName o) |
boolean |
equals(java.lang.Object other) |
java.lang.String |
getLocalName() |
XmlNamespace |
getNs() |
int |
hashCode() |
boolean |
matches(QName o)
Checks if this QName is a match for the other QName.
|
boolean |
matchesAnyLocalName()
Returns
true if this qname has a local name that will
match any local name. |
boolean |
matchesAnyNamespace()
Returns
true if this qname has a namespace value that will match
any namespace. |
java.lang.String |
toString() |
public static final XmlNamespace ANY_NAMESPACE
public static final java.lang.String ANY_LOCALNAME
public QName(java.lang.String localName)
public QName(XmlNamespace namespace, java.lang.String localName)
public XmlNamespace getNs()
public java.lang.String getLocalName()
public boolean matchesAnyNamespace()
true
if this qname has a namespace value that will match
any namespace.ANY_NAMESPACE
public boolean matchesAnyLocalName()
true
if this qname has a local name that will
match any local name.ANY_LOCALNAME
public boolean matches(QName o)
ANY_NAMESPACE
or
the two namespaces are both null or have a matching uri and 2) the local
name is ANY_LOCALNAME
or the two local names are equal.public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object