org.jboss.dna.graph.property.basic
Class BasicNamespace

java.lang.Object
  extended by org.jboss.dna.graph.property.basic.BasicNamespace
All Implemented Interfaces:
Comparable<NamespaceRegistry.Namespace>, NamespaceRegistry.Namespace

@Immutable
public class BasicNamespace
extends Object
implements NamespaceRegistry.Namespace

Basic implementation of a NamespaceRegistry namespace.


Constructor Summary
BasicNamespace(String prefix, String namespaceUri)
          Create a namespace instance.
 
Method Summary
 int compareTo(NamespaceRegistry.Namespace that)
          
 boolean equals(Object obj)
          
 String getNamespaceUri()
          Get the URI for the namespace
 String getPrefix()
          Get the prefix for the namespace
 int hashCode()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicNamespace

public BasicNamespace(String prefix,
                      String namespaceUri)
Create a namespace instance.

Parameters:
prefix - the namespace prefix; may not be null (this is not checked)
namespaceUri - the namespace URI; may not be null (this is not checked)
Method Detail

getNamespaceUri

public String getNamespaceUri()
Get the URI for the namespace

Specified by:
getNamespaceUri in interface NamespaceRegistry.Namespace
Returns:
the namespace URI; never null but possibly the empty string
See Also:
NamespaceRegistry.Namespace.getNamespaceUri()

getPrefix

public String getPrefix()
Get the prefix for the namespace

Specified by:
getPrefix in interface NamespaceRegistry.Namespace
Returns:
the prefix; never null but possibly the empty string
See Also:
NamespaceRegistry.Namespace.getPrefix()

hashCode

public int hashCode()

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

compareTo

public int compareTo(NamespaceRegistry.Namespace that)

Specified by:
compareTo in interface Comparable<NamespaceRegistry.Namespace>
See Also:
Comparable.compareTo(java.lang.Object)

equals

public boolean equals(Object obj)

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2008-2009 JBoss, a division of Red Hat. All Rights Reserved.