javax.xml.rpc.namespace
Class QName

java.lang.Object
  |
  +--javax.xml.rpc.namespace.QName

public final class QName
extends java.lang.Object

QName class represents a qualified name based on "Namespaces in XML" specification. A QName is represented as: QName ::= (Prefix ':') ? LocalPart Upgraded the implementation so that the namespaceURI and localPart are always non-null. This simplifies the implementation, increases performance, and cleans up NullPointerException problems. Upgraded the implemenation to make QName a final class, changed the namespaceURI and localPart to final (and interned) Strings, changed equals() to use == comparison on interned Strings.

Version:
0.1

Constructor Summary
QName(java.lang.String localPart)
          Constructor for the QName.
QName(java.lang.String namespaceURI, java.lang.String localPart)
          Constructor for the QName.
 
Method Summary
 boolean equals(java.lang.Object p1)
          Indicates whether some other object is "equal to" this QName object.
 java.lang.String getLocalPart()
          Gets the Local part for this QName
 java.lang.String getNamespaceURI()
          Gets the Namespace URI for this QName
 int hashCode()
          Returns a hash code value for this QName object.
 java.lang.String toString()
          Returns a string representation of this QName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QName

public QName(java.lang.String localPart)
Constructor for the QName.
Parameters:
localPart - - Local part of the QName

QName

public QName(java.lang.String namespaceURI,
             java.lang.String localPart)
Constructor for the QName.
Parameters:
namespaceURI - - Namespace URI for the QName
localPart - - Local part of the QName
Method Detail

getNamespaceURI

public java.lang.String getNamespaceURI()
Gets the Namespace URI for this QName
Returns:
namespaceURI

getLocalPart

public java.lang.String getLocalPart()
Gets the Local part for this QName
Returns:
the Local part for this QName.

toString

public java.lang.String toString()
Returns a string representation of this QName
Overrides:
toString in class java.lang.Object
Returns:
a string representation of the QName

equals

public boolean equals(java.lang.Object p1)
Indicates whether some other object is "equal to" this QName object.
Overrides:
equals in class java.lang.Object
Parameters:
p1 - - the reference object with which to compare
Returns:
true if this object is the same as the obj argument; false otherwise.

hashCode

public int hashCode()
Returns a hash code value for this QName object.
Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this Qname object


Copyright © 2001 Apache XML Project. All Rights Reserved.