Class QualifiedName
public class QualifiedName extends Name
{
// Methods
public static QualifiedName create(Name name, Name nameSpace);
public boolean equals(Object that);
public Name getName();
public Name getNameSpace();
static public Name getNameSpace(Name n);
public void save(XMLOutputStream o);
public String toString();
}
This class represents a QualifiedName object and is used for efficient sharing of duplicate strings in the system. A QualifiedName is a combination of a Name and an associated namespace.
Name
|
+--QualifiedName
public static QualifiedName create(Name name, Name nameSpace);
Creates a QualifiedName object for the given Name and namespace. QualifiedName objects are case sensitive.
Return Value:
Returns a QualifiedName object that is constructed with the given parameters.
Parameter | Description |
name
| The Name of the QualifiedName object.
nameSpace
| The namespace of the QualifiedName object.
| |
public boolean equals(Object that);
Determines whether the current QualifiedName object is equal to the one passed in the that parameter.
Return Value:
Returns true if the objects are equal; otherwise, returns false.
Parameter | Description |
that
| The object with which to compare the QualifiedName object.
|
Overrides:
equals(Object) in Name.
public Name getName();
Retrieves the Name component of the QualifiedName object.
Return Value:
Returns the Name.
public Name getNameSpace();
Retrieves the namespace component that the QualifiedName object is created with.
Return Value:
Returns the namespace.
static public Name getNameSpace(Name n);
Retrieves the global namespace for the given Name object if that Name object is a valid QualifiedName.
Return Value:
Returns the namespace of the specified Name object; returns null if the Name object is not valid.
Parameter | Description |
n
| The Name object for which to retrieve the namespace.
|
public void save(XMLOutputStream o);
Writes the QualifiedName (Name and its associated namespace) to an XMLOutputStream object.
Return Value:
No return value.
Parameter | Description |
o
| The output stream to write the data to.
|
public String toString();
Retrieves a String representation of the class name for the QualifiedName object.
Return Value:
Returns the class name of the QualifiedName object.
Overrides:
toString() in Name.