org.omg.CosNaming
Class NameComponent

java.lang.Object
  extended by org.omg.CosNaming.NameComponent
All Implemented Interfaces:
Serializable, IDLEntity

public final class NameComponent
extends Object
implements IDLEntity

The name component, a node in the multi-comonent name.

See Also:
Serialized Form

Field Summary
 String id
          The name component identifier.
 String kind
          The name component kind (this conception is similar to the file type conception.
 
Constructor Summary
NameComponent()
          Create the empty name component.
NameComponent(String _id, String _kind)
          Create the initialised name component.
 
Method Summary
 boolean equals(Object other)
          Returns true if both name and kind are equal.
 int hashCode()
          Return the hashCode of this NameComponent.
 String toString()
          Get a string representation (id.kind).
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

id

public String id
The name component identifier.


kind

public String kind
The name component kind (this conception is similar to the file type conception.

Constructor Detail

NameComponent

public NameComponent()
Create the empty name component.


NameComponent

public NameComponent(String _id,
                     String _kind)
Create the initialised name component.

Method Detail

equals

public boolean equals(Object other)
Returns true if both name and kind are equal.

Overrides:
equals in class Object
Parameters:
other - the Object to compare to
Returns:
whether this Object is semantically equal to another
See Also:
Object.hashCode()

toString

public String toString()
Get a string representation (id.kind).

Overrides:
toString in class Object
Returns:
the String representing this Object, which may be null
See Also:
Object.getClass(), Object.hashCode(), Class.getName(), Integer.toHexString(int)

hashCode

public int hashCode()
Return the hashCode of this NameComponent.

Overrides:
hashCode in class Object
Returns:
the hash code for this Object
See Also:
Object.equals(Object), System.identityHashCode(Object)