org.eclipse.rdf4j.model.base

## Class AbstractIRI

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

- All Implemented Interfaces:
    Serializable, IRI, Resource, URI, Value
  Direct Known Subclasses:
    SimpleIRI

      public abstract class AbstractIRI
      extends Object
      implements IRI

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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractIRI()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)` Compares this IRI to another object.
    `int` | `hashCode()` Computes the hash code of this IRI.
    `String` | `stringValue()` Returns the String-value of a `Value` object.
    `String` | `toString()` Returns the String-representation of this URI.

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

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

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

      `getLocalName, getNamespace, isIRI`

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

      `isResource`

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

      `isBNode, isLiteral, isTriple`

- - ### Constructor Detail

    - #### AbstractIRI

          public AbstractIRI()

  - ### Method Detail

    - #### stringValue

          public String stringValue()

      Description copied from interface: `Value`
      Returns the String-value of a `Value` object. This returns either a `Literal`'s label, a `IRI`'s URI or a `BNode`'s ID.
      Specified by:
        `stringValue` in interface `Value`

    - #### equals

          public boolean equals(Object o)

      Description copied from interface: `IRI`
      Compares this IRI to another object.
      Specified by:
        `equals` in interface `IRI`
      Specified by:
        `equals` in interface `URI`
      Overrides:
        `equals` in class `Object`
      Parameters:
        `o` - the object to compare this IRI to
      Returns:
        `true`, if the other object is an instance of `IRI` and their string values are equal; `false`, otherwise

    - #### hashCode

          public int hashCode()

      Description copied from interface: `IRI`
      Computes the hash code of this IRI.
      Specified by:
        `hashCode` in interface `IRI`
      Specified by:
        `hashCode` in interface `URI`
      Overrides:
        `hashCode` in class `Object`
      Returns:
        a hash code for this IRI computed as `URI.toString()``.hashCode()`

    - #### toString

          public String toString()

      Description copied from interface: `URI`
      Returns the String-representation of this URI.
      Specified by:
        `toString` in interface `URI`
      Overrides:
        `toString` in class `Object`
      Returns:
        The String-representation of this URI.

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