org.eclipse.webdav.internal.kernel
Class QualifiedNameImpl

java.lang.Object
  extended by org.eclipse.webdav.internal.kernel.QualifiedNameImpl
All Implemented Interfaces:
QualifiedName

public class QualifiedNameImpl
extends Object
implements QualifiedName

Qualified names are two-part names: qualifier and local name. The qualifier must be in URI form (see RFC2396). Note however that the qualifier may be null if the default name space is being used. The empty space is not a valid qualifier.


Field Summary
protected  String localName
          Local name part.
protected  String qualifier
          Qualifier part (potentially null).
 
Constructor Summary
QualifiedNameImpl(String qualifier, String localName)
          Creates and returns a new qualified name with the given qualifier and local name.
 
Method Summary
 boolean equals(Object obj)
          Returns true if this qualified name is equivalent to the given object.
 String getLocalName()
          Returns the local part of this name.
 String getQualifier()
          Returns the qualifier part for this qualifed name, or null if none.
 int hashCode()
          Returns the hash code for this qualified name.
 String toString()
          Converts this qualified name into a string, suitable for display (unsuitable for parsing back to a qualified name!).
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

qualifier

protected String qualifier
Qualifier part (potentially null).


localName

protected String localName
Local name part.

Constructor Detail

QualifiedNameImpl

public QualifiedNameImpl(String qualifier,
                         String localName)
Creates and returns a new qualified name with the given qualifier and local name. The local name must not be the empty string. The qualifier may be null.

Method Detail

equals

public boolean equals(Object obj)
Returns true if this qualified name is equivalent to the given object.

Qualified names are equal if and only if they have the same qualified parts and local parts. Qualified names are not equal to objects other than qualified names.

Overrides:
equals in class Object

getLocalName

public String getLocalName()
Returns the local part of this name.

Specified by:
getLocalName in interface QualifiedName
Returns:
the local name.

getQualifier

public String getQualifier()
Returns the qualifier part for this qualifed name, or null if none.

Specified by:
getQualifier in interface QualifiedName
Returns:
the name qualifier as a String URI or null if there is no qualifier.

hashCode

public int hashCode()
Returns the hash code for this qualified name.

Overrides:
hashCode in class Object

toString

public String toString()
Converts this qualified name into a string, suitable for display (unsuitable for parsing back to a qualified name!).

Overrides:
toString in class Object


Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.