org.eclipse.rdf4j.model.base

## Class AbstractStatement

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

- All Implemented Interfaces:
    Serializable, Statement
  Direct Known Subclasses:
    SimpleStatement

      public abstract class AbstractStatement
      extends Object
      implements Statement

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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractStatement()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)` Compares this statement to another object.
    `int` | `hashCode()` Computes the hash code of this statement.
    `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.Statement

      `getContext, getObject, getPredicate, getSubject`

- - ### Constructor Detail

    - #### AbstractStatement

          public AbstractStatement()

  - ### Method Detail

    - #### equals

          public boolean equals(Object o)

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

    - #### hashCode

          public int hashCode()

      Description copied from interface: `Statement`
      Computes the hash code of this statement.
      Specified by:
        `hashCode` in interface `Statement`
      Overrides:
        `hashCode` in class `Object`
      Returns:
        a hash code for this statement computed as `Objects.hash`( `Statement.getSubject()`, `Statement.getPredicate()`, `Statement.getObject()`, `Statement.getContext()`)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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