|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.naming.CompositeName
public class CompositeName
| Constructor Summary | |
|---|---|
|
CompositeName()
|
protected |
CompositeName(Enumeration comps)
|
|
CompositeName(String n)
|
| Method Summary | |
|---|---|
Name |
add(int posn,
String comp)
Inserts the given String component to this Name
at the given index. |
Name |
add(String comp)
Adds the given String component to the end of this
Name. |
Name |
addAll(int posn,
Name n)
Inserts all the components of the given Name to this
Name at the given index. |
Name |
addAll(Name suffix)
Adds all the components of the given Name to the end of this
Name. |
Object |
clone()
clone creates a shallow clone of this. |
int |
compareTo(Object obj)
Compares the given object to this Name. |
boolean |
endsWith(Name n)
Returns true if this Name ends with the
components of the given Name, false otherwise. |
boolean |
equals(Object obj)
equals compares this object to another object. |
String |
get(int posn)
Gets the component at the given index. |
Enumeration |
getAll()
Returns a non-null (but possibly empty) Enumeration of the
components of the Name as Strings. |
Name |
getPrefix(int posn)
Returns the components till the given index as a Name. |
Name |
getSuffix(int posn)
Returns the components from the given index till the end as a Name. |
int |
hashCode()
hashCode returns a hash code for this object. |
boolean |
isEmpty()
Returns true if the number of components of this
Name is zero, false otherwise. |
Object |
remove(int posn)
Removes the component at the given index from this Name. |
int |
size()
Returns the number of components of this Name. |
boolean |
startsWith(Name n)
Returns true if this Name starts with the
components of the given Name, false otherwise. |
String |
toString()
toString creates a printable string that represents this object for debugging purposes. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CompositeName()
protected CompositeName(Enumeration comps)
public CompositeName(String n)
throws InvalidNameException
InvalidNameException| Method Detail |
|---|
public Name add(int posn,
String comp)
throws InvalidNameException
NameString component to this Name
at the given index. The method modifies the current Name and
then returns it.
add in interface NameInvalidNameException - if the given String is not a
valid component for this Name.
public Name add(String comp)
throws InvalidNameException
NameString component to the end of this
Name. The method modifies the current Name and
then returns it.
add in interface NameInvalidNameException - if the given String is not a
valid component for this Name.
public Name addAll(int posn,
Name n)
throws InvalidNameException
NameName to this
Name at the given index. The method modifies the current
Name and then returns it.
addAll in interface NameInvalidNameException - if any of the given components is not a
valid component for this Name.
public Name addAll(Name suffix)
throws InvalidNameException
NameName to the end of this
Name. The method modifies the current Name and
then returns it.
addAll in interface NameInvalidNameException - if any of the given components is not a
valid component for this Name.public Object clone()
Object
clone in interface Nameclone in class Objectpublic int compareTo(Object obj)
NameName.
Returns a negative value if the given Object is smaller then
this Name, a positive value if the Object is
bigger, and zero if the are equal. If the Object is not of
a class that can be compared to the class of this Name then
a ClassCastException is thrown. Note that it is not
guaranteed that Names implemented in different classes can
be compared. The definition of smaller, bigger and equal is up to the
actual implementing class.
compareTo in interface ComparablecompareTo in interface Nameobj - the other object
public boolean endsWith(Name n)
Nametrue if this Name ends with the
components of the given Name, false otherwise.
endsWith in interface Namepublic boolean equals(Object obj)
ObjectEquals must be symmetric (a.equals(b) == b.equals(a)), reflexive (a.equals(a)==true) and transitive (a.equals(b) && b.equals(c) IMPLIES (a.equals(c))) and not change over time (a.equals(b) == a.equals(b)). a.equals(null) should always return false.
If a.equals(b) is true for two objects a and b, then a.hashCode()==b.hashCode() must hold.
The default implementation of equals returns this==other.
equals in class Objectobj - the other object.
public String get(int posn)
Name
get in interface Namepublic Enumeration getAll()
NameEnumeration of the
components of the Name as Strings.
getAll in interface Namepublic Name getPrefix(int posn)
NameName.
The returned Name can be modified without changing the
original.
getPrefix in interface Namepublic Name getSuffix(int posn)
NameName.
The returned Name can be modified without changing the
original.
getSuffix in interface Namepublic int hashCode()
ObjectThe default implementation returns System.identityHashCode(this).
hashCode in class Objectpublic boolean isEmpty()
Nametrue if the number of components of this
Name is zero, false otherwise.
isEmpty in interface Name
public Object remove(int posn)
throws InvalidNameException
NameName.
The method modifies the current Name and then returns it.
remove in interface NameInvalidNameException - if the given String is not a
valid component for this Name.public int size()
NameName.
The returned number can be zero.
size in interface Namepublic boolean startsWith(Name n)
Nametrue if this Name starts with the
components of the given Name, false otherwise.
startsWith in interface Namepublic String toString()
ObjectThe default implementation returns getClass().getName() + '@' + Integer.toHexString(hashCode()).
toString in class Object
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||