public class QName
extends java.lang.Object
implements javax.naming.Name
| Modifier and Type | Field and Description |
|---|---|
protected javax.naming.Context |
_context |
| Constructor and Description |
|---|
QName(javax.naming.Context context)
Creates a root name based on a context.
|
QName(javax.naming.Context context,
java.lang.String first)
Creates a new name with a single component.
|
QName(javax.naming.Context context,
java.lang.String first,
java.lang.String rest)
Creates a new name with two components
|
| Modifier and Type | Method and Description |
|---|---|
javax.naming.Name |
add(int posn,
java.lang.String comp)
Add a component at a specific position, returning the name.
|
javax.naming.Name |
add(java.lang.String comp)
Add a component to the tail of the name, returning the name.
|
javax.naming.Name |
addAll(int posn,
javax.naming.Name suffix)
Insert a name to the current name.
|
javax.naming.Name |
addAll(javax.naming.Name suffix)
Append a name to the current name.
|
java.lang.Object |
clone()
Clones the name.
|
int |
compareTo(java.lang.Object rawB)
Compares the name to another name.
|
boolean |
endsWith(javax.naming.Name name) |
boolean |
equals(java.lang.Object obj)
Returns true if the object is an equivalent name.
|
java.lang.String |
get(int pos) |
java.util.Enumeration |
getAll() |
javax.naming.Name |
getPrefix(int posn) |
javax.naming.Name |
getSuffix(int posn) |
int |
hashCode()
Returns the name's hash code.
|
boolean |
isEmpty() |
java.lang.Object |
remove(int posn) |
int |
size() |
boolean |
startsWith(javax.naming.Name name)
Returns true if the argument is a prefix of the name.
|
java.lang.String |
toString()
Converts the name to a string.
|
public QName(javax.naming.Context context)
context - the root contextpublic QName(javax.naming.Context context,
java.lang.String first)
context - the root contextfirst - the first name componentpublic QName(javax.naming.Context context,
java.lang.String first,
java.lang.String rest)
context - the root contextfirst - the first name componenttail - the tail name componentpublic java.lang.Object clone()
clone in interface javax.naming.Nameclone in class java.lang.Objectpublic int size()
size in interface javax.naming.Namepublic boolean isEmpty()
isEmpty in interface javax.naming.Namepublic java.util.Enumeration getAll()
getAll in interface javax.naming.Namepublic java.lang.String get(int pos)
get in interface javax.naming.Namepublic javax.naming.Name getPrefix(int posn)
getPrefix in interface javax.naming.Namepublic javax.naming.Name getSuffix(int posn)
getSuffix in interface javax.naming.Namepublic boolean startsWith(javax.naming.Name name)
startsWith in interface javax.naming.Namename - the Name to start as a prefix.public boolean endsWith(javax.naming.Name name)
endsWith in interface javax.naming.Namepublic javax.naming.Name addAll(javax.naming.Name suffix)
throws javax.naming.InvalidNameException
addAll in interface javax.naming.Namesuffix - the name to add as a suffixjavax.naming.InvalidNameExceptionpublic javax.naming.Name addAll(int posn,
javax.naming.Name suffix)
throws javax.naming.InvalidNameException
addAll in interface javax.naming.Namesuffix - the name to add as a suffixjavax.naming.InvalidNameExceptionpublic javax.naming.Name add(java.lang.String comp)
throws javax.naming.InvalidNameException
add in interface javax.naming.Namecomp - the new component to add.javax.naming.InvalidNameExceptionpublic javax.naming.Name add(int posn,
java.lang.String comp)
throws javax.naming.InvalidNameException
add in interface javax.naming.Namejavax.naming.InvalidNameExceptionpublic java.lang.Object remove(int posn)
throws javax.naming.InvalidNameException
remove in interface javax.naming.Namejavax.naming.InvalidNameExceptionpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to test for equality.public int compareTo(java.lang.Object rawB)
compareTo in interface java.lang.Comparable<java.lang.Object>compareTo in interface javax.naming.Namepublic java.lang.String toString()
toString in class java.lang.Object