org.eclipse.rdf4j.model.base

## Class AbstractNamespace

- java.lang.Object
- - org.eclipse.rdf4j.model.base.AbstractNamespace

- All Implemented Interfaces:
    Serializable, Comparable<Namespace>, Namespace
  Direct Known Subclasses:
    SimpleNamespace

      public abstract class AbstractNamespace
      extends Object
      implements Namespace

  Base class for `Namespace`, offering common functionality.
  Since:
    3.5.0
  Author:
    Alessandro Bollini
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractNamespace()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(Namespace o)`
    `boolean` | `equals(Object object)` Compares this namespace to another object.
    `int` | `hashCode()` Computes the hash code of this namespace.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.rdf4j.model.Namespace

      `getName, getPrefix`

- - ### Constructor Detail

    - #### AbstractNamespace

          public AbstractNamespace()

  - ### Method Detail

    - #### compareTo

          public int compareTo(Namespace o)

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

    - #### equals

          public boolean equals(Object object)

      Description copied from interface: `Namespace`
      Compares this namespace to another object.
      Specified by:
        `equals` in interface `Namespace`
      Overrides:
        `equals` in class `Object`
      Parameters:
        `object` - The object to compare this namespace to
      Returns:
        `true` if the other object is an instance of `Namespace` and their prefixes and names are equal, `false` otherwise.

    - #### hashCode

          public int hashCode()

      Description copied from interface: `Namespace`
      Computes the hash code of this namespace.
      Specified by:
        `hashCode` in interface `Namespace`
      Overrides:
        `hashCode` in class `Object`
      Returns:
        a hash code for this namespace computed as `Objects.hash`( `Namespace.getPrefix()`, `Namespace.getName()`)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.