public class QualifiedName extends Object implements Comparable<QualifiedName>
A qualified name that is a qualifier and a name. It can be seen as a simplified version of an XML QName that retains only the prefix (qualifier) and the local name (name) and leaves out the namespace.
Qualified names have a string representation that is equals to the concatenation of the qualifier and name separated by a colon (:) character. When the
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(QualifiedName o) |
static QualifiedName |
create(String name)
Creates a qualified name with an empty string qualifier.
|
static QualifiedName |
create(String qualifier,
String name)
Creates a qualified name.
|
boolean |
equals(Object obj) |
String |
getName()
Returns the name.
|
String |
getQualifier()
Returns the qualifier.
|
String |
getValue()
Returns the string representation.
|
int |
hashCode() |
static QualifiedName |
parse(String qname)
Parse the string representation of a qname and returns a qualified name.
|
String |
toString() |
public static QualifiedName parse(String qname) throws IllegalArgumentException
qname - the qname to parseNullPointerException - if the qname argument is nullIllegalArgumentException - if the qname argument contains more than one colon characterpublic static QualifiedName create(String qualifier, String name) throws NullPointerException, IllegalArgumentException
qualifier - the qualifiername - the nameNullPointerException - if any argument is nullIllegalArgumentException - if any argument contains a colon characterpublic static QualifiedName create(String name) throws NullPointerException, IllegalArgumentException
name - the nameNullPointerException - if any argument is nullIllegalArgumentException - if any argument contains a colon characterpublic String getQualifier()
public String getName()
public String getValue()
public int compareTo(QualifiedName o)
compareTo in interface Comparable<QualifiedName>Copyright © 2017 JBoss by Red Hat. All Rights Reserved.