public class SortableQName extends Object implements Serializable, Comparable<SortableQName>
Constructor and Description |
---|
SortableQName(QName qname)
Constructor.
|
SortableQName(String name)
Constructor specifying the name.
|
SortableQName(String namespaceURI,
String localPart)
Constructor specifying the Namespace URI and local part.
|
SortableQName(String namespaceURI,
String localPart,
String prefix)
Constructor specifying the Namespace URI, local part and prefix.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
compareQNames(QName qname1,
QName qname2)
Compare two qualified names including the prefix in the comparison.
|
int |
compareTo(SortableQName qname) |
boolean |
equals(Object obj) |
String |
getCompleteName()
Return the complete name of the sortable QName.
|
String |
getLocalPart()
Return the local part of the
QName . |
String |
getNamespaceURI()
Return the Namespace URI of the
QName . |
String |
getPrefix()
Return the prefix of this
QName . |
QName |
getQName()
Return the underlying qualified name.
|
int |
hashCode() |
String |
toString() |
public SortableQName(QName qname)
qname
- the qualified nameIllegalArgumentException
- When localPart
is null
public SortableQName(String namespaceURI, String localPart)
namespaceURI
- Namespace URI of the QName
localPart
- local part of the QName
IllegalArgumentException
- When localPart
is null
public SortableQName(String namespaceURI, String localPart, String prefix)
namespaceURI
- Namespace URI of the QName
localPart
- local part of the QName
prefix
- prefix of the QName
IllegalArgumentException
- When localPart
or prefix
is null
public SortableQName(String name)
name
- the name can be only the local part, or also contain the prefix.IllegalArgumentException
- When name
is null
public QName getQName()
public String getNamespaceURI()
QName
.QName
public String getLocalPart()
QName
.QName
public String getPrefix()
QName
.QName
public String getCompleteName()
public static boolean compareQNames(QName qname1, QName qname2)
qname1
- the first qualified nameqname2
- the second qualified namepublic int compareTo(SortableQName qname)
compareTo
in interface Comparable<SortableQName>