Package org.exoplatform.web.controller
Class QualifiedName
java.lang.Object
org.exoplatform.web.controller.QualifiedName
- All Implemented Interfaces:
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
-
Method Summary
Modifier and TypeMethodDescriptionintstatic QualifiedNameCreates a qualified name with an empty string qualifier.static QualifiedNameCreates a qualified name.booleangetName()Returns the name.Returns the qualifier.getValue()Returns the string representation.inthashCode()static QualifiedNameParse the string representation of a qname and returns a qualified name.toString()
-
Method Details
-
parse
Parse the string representation of a qname and returns a qualified name.- Parameters:
qname- the qname to parse- Returns:
- the corresponding qualified name
- Throws:
NullPointerException- if the qname argument is nullIllegalArgumentException- if the qname argument contains more than one colon character
-
create
public static QualifiedName create(String qualifier, String name) throws NullPointerException, IllegalArgumentException Creates a qualified name.- Parameters:
qualifier- the qualifiername- the name- Returns:
- the qualified name
- Throws:
NullPointerException- if any argument is nullIllegalArgumentException- if any argument contains a colon character
-
create
public static QualifiedName create(String name) throws NullPointerException, IllegalArgumentException Creates a qualified name with an empty string qualifier.- Parameters:
name- the name- Returns:
- the qualified name
- Throws:
NullPointerException- if any argument is nullIllegalArgumentException- if any argument contains a colon character
-
getQualifier
Returns the qualifier.- Returns:
- the qualifier
-
getName
Returns the name.- Returns:
- the name
-
getValue
Returns the string representation.- Returns:
- the string representation
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<QualifiedName>
-
toString
-