org.eclipse.rdf4j.model

## Interface Triple

- All Superinterfaces:
    Resource, Serializable, Value
  All Known Implementing Classes:
    MemTriple, SimpleTriple

      @Experimental
      public interface Triple
      extends Resource

  An RDF* triple. Triples have a subject, predicate and object. Unlike `Statement`, a triple never has an associated context.
  Author:
    Pavel Mihaylov
  See Also:
    `Statements`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object other)` Compares this triple to another object.
    `Value` | `getObject()` Gets the object of this triple.
    `IRI` | `getPredicate()` Gets the predicate of this triple.
    `Resource` | `getSubject()` Gets the subject of this triple.
    `int` | `hashCode()` Computes the hash code of this triple.

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

      `stringValue`

- - ### Method Detail

    - #### getSubject

          Resource getSubject()

      Gets the subject of this triple.
      Returns:
        The triple's subject.

    - #### getPredicate

          IRI getPredicate()

      Gets the predicate of this triple.
      Returns:
        The triple's predicate.

    - #### getObject

          Value getObject()

      Gets the object of this triple.
      Returns:
        The triple's object.

    - #### equals

          boolean equals(Object other)

      Compares this triple to another object.
      Overrides:
        `equals` in class `Object`
      Parameters:
        `other` - the object to compare this triple to
      Returns:
        `true` if the `other` object is an instance of `Triple` and if their subjects, predicates and objects are equal; `false` otherwise

    - #### hashCode

          int hashCode()

      Computes the hash code of this triple.
      Overrides:
        `hashCode` in class `Object`
      Returns:
        a hash code for this triple computed as `Objects.hash`( `getSubject()`, `getPredicate()`, `getObject()`)

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