org.eclipse.rdf4j.model.impl

## Class SimpleNamespace

- java.lang.Object
- - org.eclipse.rdf4j.model.impl.SimpleNamespace

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

      public class SimpleNamespace
      extends Object
      implements Namespace

  A default implementation of the `Namespace` interface.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleNamespace(String prefix, String name)` Creates a new Namespace object.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(Namespace o)`
    `boolean` | `equals(Object obj)`
    `String` | `getName()` Gets the name of the namespace.
    `String` | `getPrefix()` Gets the prefix of the namespace.
    `int` | `hashCode()`
    `void` | `setName(String name)` Sets the name of the namespace.
    `void` | `setPrefix(String prefix)` Sets the prefix of the namespace.
    `String` | `toString()` Returns a string representation of the object.

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

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

- - ### Constructor Detail

    - #### SimpleNamespace

          public SimpleNamespace(String prefix,
                                 String name)

      Creates a new Namespace object.
      Parameters:
        `prefix` - The namespace's prefix.
        `name` - The namespace's name.

  - ### Method Detail

    - #### getPrefix

          public String getPrefix()

      Gets the prefix of the namespace.
      Specified by:
        `getPrefix` in interface `Namespace`
      Returns:
        prefix of the namespace

    - #### setPrefix

          public void setPrefix(String prefix)

      Sets the prefix of the namespace.
      Parameters:
        `prefix` - The (new) prefix for this namespace.

    - #### getName

          public String getName()

      Gets the name of the namespace.
      Specified by:
        `getName` in interface `Namespace`
      Returns:
        name of the namespace

    - #### setName

          public void setName(String name)

      Sets the name of the namespace.
      Parameters:
        `name` - The (new) name for this namespace.

    - #### toString

          public String toString()

      Returns a string representation of the object.
      Overrides:
        `toString` in class `Object`
      Returns:
        String representation of the namespace

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### compareTo

          public int compareTo(Namespace o)

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

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