public class QName
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
QName(java.lang.String localPart)
Constructor for the QName with just a local part.
|
QName(java.lang.String namespaceURI,
java.lang.String localPart)
Constructor for the QName with a namespace URI and a local part.
|
QName(java.lang.String namespaceURI,
java.lang.String localPart,
java.lang.String prefix)
Constructor for the QName.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Tests this QName for equality with another object.
|
java.lang.String |
getLocalPart()
Gets the Local part for this QName.
|
java.lang.String |
getNamespaceURI()
Gets the Namespace URI for this QName.
|
java.lang.String |
getPrefix()
Gets the prefix for this QName.
|
int |
hashCode()
Returns a hash code value for this QName object.
|
java.lang.String |
toString()
Returns a string representation of this QName.
|
static QName |
valueOf(java.lang.String s)
Returns a QName holding the value of the specified String.
|
public QName(java.lang.String localPart)
namespaceURI,
prefix and localPart.localPart - Local part of the QNamejava.lang.IllegalArgumentException - If null local part is specifiedpublic QName(java.lang.String namespaceURI,
java.lang.String localPart)
prefix.namespaceURI - Namespace URI for the QNamelocalPart - Local part of the QNamejava.lang.IllegalArgumentException - If null local part or namespaceURI is specifiedpublic QName(java.lang.String namespaceURI,
java.lang.String localPart,
java.lang.String prefix)
namespaceURI - Namespace URI for the QNamelocalPart - Local part of the QNameprefix - The prefix of the QNamejava.lang.IllegalArgumentException - If null local part or prefix is specifiedpublic java.lang.String getNamespaceURI()
public java.lang.String getLocalPart()
public java.lang.String getPrefix()
String value of the prefix.public java.lang.String toString()
toString in class java.lang.Objectpublic static QName valueOf(java.lang.String s)
s - the string to be parsedjava.lang.IllegalArgumentException - If the specified String cannot be parsed as a QNamepublic final int hashCode()
Object.hashCode method.
hashCode in class java.lang.Objectpublic final boolean equals(java.lang.Object obj)
String.equals to check equality of localPart and namespaceURI.
Object.equals method.
equals in class java.lang.Objectobj - the reference object with which to compare.