|
JBoss Remoting 3.0.0.Beta2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.remoting.spi.QualifiedName
public final class QualifiedName
A qualified name for service registration. A qualified name is a path-like structure comprised of a series of
zero or more name segments. The string representation of a qualified name is a sequence of a forward slash
(/
) followed by a non-empty URL-encoded name segment.
Field Summary | |
---|---|
static QualifiedName |
ROOT_NAME
The root name. |
Constructor Summary | |
---|---|
QualifiedName(String[] nameSegments)
Create a new qualified name from the given name segments. |
Method Summary | |
---|---|
int |
compareTo(QualifiedName o)
Compare this qualified name to another. |
boolean |
equals(Object o)
Compare this qualified name to another for equality. |
int |
hashCode()
Get the hash code of this qualified name. |
Iterator<String> |
iterator()
Get an iterator over the sequence of strings. |
int |
length()
Get the number of segments in this name. |
static QualifiedName |
parse(String path)
Parse a qualified name. |
String |
toString()
Get the string representation of this qualified name. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final QualifiedName ROOT_NAME
Constructor Detail |
---|
public QualifiedName(String[] nameSegments) throws NullPointerException, IllegalArgumentException
nameSegments
- the name segments
NullPointerException
- if nameSegments
is null
or if any element of that array is null
IllegalArgumentException
- if an element of nameSegments
is an empty stringMethod Detail |
---|
public boolean equals(Object o)
true
if both names have the same number of segments
with the same content.
equals
in class Object
o
- the object to compare to
true
if the given object is a qualified name which is equal to this namepublic int hashCode()
Arrays.hashCode(segments)
where segments
is the array of decoded segment strings.
hashCode
in class Object
public int compareTo(QualifiedName o)
compareTo
in interface Comparable<QualifiedName>
o
- the other name
0
if the elements are equal, -1
if this name comes before the given name, or 1
if
this name comes after the given namepublic String toString()
/
"; all other names are comprised
of one or more consecutive character sequences of a forward slash followed by one or more URL-encoded characters.
toString
in class Object
public static QualifiedName parse(String path)
/
") or else
a series of path components, each comprised of a single forward slash followed by a URL-encoded series of non-forward-slash
characters.
path
- the path
public Iterator<String> iterator()
iterator
in interface Iterable<String>
public int length()
|
JBoss Remoting 3.0.0.Beta2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |