org.modeshape.jcr.value.basic

## Class BasicNamespace

- java.lang.Object
- - org.modeshape.jcr.value.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

    Constructors
    Constructor and Description
    `BasicNamespace(String prefix, String namespaceUri)` Create a namespace instance.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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

      `clone, finalize, 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()

      Description copied from interface: `NamespaceRegistry.Namespace`
      Get the URI for the namespace
      Specified by:
        `getNamespaceUri` in interface `NamespaceRegistry.Namespace`
      Returns:
        the namespace URI; never null but possibly the empty string

    - #### getPrefix

          public String getPrefix()

      Description copied from interface: `NamespaceRegistry.Namespace`
      Get the prefix for the namespace
      Specified by:
        `getPrefix` in interface `NamespaceRegistry.Namespace`
      Returns:
        the prefix; never null but possibly the empty string

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### compareTo

          public int compareTo(NamespaceRegistry.Namespace that)

      Specified by:
        `compareTo` in interface `Comparable<NamespaceRegistry.Namespace>`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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