Tests this QName for equality with another object.
If the given object is not a QName or String equivalent or is null then this method
returns false.
For two QNames to be considered equal requires that both
localPart and namespaceURI must be equal. This method uses
String.equals to check equality of localPart
and namespaceURI. Any class that extends QName is required
to satisfy this equality contract.
If the supplied object is a String, then it is split in two on the last colon
and the first half is compared against the prefix || namespaceURI
and the second half is compared against the localPart
i.e. assert new QName("namespace","localPart").equals("namespace:localPart")
Intended Usage: for gpath accessors, e.g. root.'urn:mynamespace:node'
Warning: this equivalence is not commutative,
i.e. qname.equals(string) may be true/false but string.equals(qname) is always false
This method satisfies the general contract of the Object.equals method.
Parameters: o - the reference object with which to compare true if the given object is identical to thisQName: false otherwise. |