org.eclipse.rdf4j.sail.extensiblestore.valuefactory

## Class ExtensibleStatementImpl

- java.lang.Object
- - org.eclipse.rdf4j.model.base.AbstractStatement
  - - org.eclipse.rdf4j.model.impl.SimpleStatement
    - - org.eclipse.rdf4j.sail.extensiblestore.valuefactory.ExtensibleStatementImpl

- All Implemented Interfaces:
    Serializable, Statement, ExtensibleStatement

      public class ExtensibleStatementImpl
      extends SimpleStatement
      implements ExtensibleStatement

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExtensibleStatementImpl(Resource subject, IRI predicate, Value object, boolean inferred)` Creates a new Statement with the supplied subject, predicate and object.

  - ### 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.
    `boolean` | `isInferred()`

    - ### Methods inherited from class org.eclipse.rdf4j.model.impl.SimpleStatement

      `getContext, getObject, getPredicate, getSubject`

    - ### Methods inherited from class org.eclipse.rdf4j.model.base.AbstractStatement

      `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

    - #### ExtensibleStatementImpl

          public ExtensibleStatementImpl(Resource subject,
                                         IRI predicate,
                                         Value object,
                                         boolean inferred)

      Creates a new Statement with the supplied subject, predicate and object. *

      Note that creating SimpleStatement objects directly via this constructor is not the recommended approach. Instead, use a `ValueFactory` (obtained from your repository or by using `SimpleValueFactory.getInstance()`) to create new Statement objects.

      Parameters:
        `subject` - The statement's subject, must not be `null`.
        `predicate` - The statement's predicate, must not be `null`.
        `object` - The statement's object, must not be `null`.
      See Also:
        `SimpleValueFactory.createStatement(Resource, IRI, Value)`

  - ### Method Detail

    - #### isInferred

          public boolean isInferred()

      Specified by:
        `isInferred` in interface `ExtensibleStatement`

    - #### 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 `AbstractStatement`
      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 `AbstractStatement`
      Returns:
        a hash code for this statement computed as `Objects.hash`( `Statement.getSubject()`, `Statement.getPredicate()`, `Statement.getObject()`, `Statement.getContext()`)

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