Class GenericStatement<R extends Resource,I extends IRI,V extends Value>

java.lang.Object
org.eclipse.rdf4j.model.impl.GenericStatement<R,I,V>
All Implemented Interfaces:
Serializable, Statement
Direct Known Subclasses:
MemStatement

@Experimental public class GenericStatement<R extends Resource,I extends IRI,V extends Value> extends Object implements Statement
An implementation of the Statement interface with support for Java Generics.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final R
     
    protected final V
     
    protected final I
     
    protected final R
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    GenericStatement(R subject, I predicate, V object, R context)
    Creates a new Statement with the supplied subject, predicate and object for the specified associated context.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Compares this statement to another object.
    Gets the context of this statement.
    Gets the object of this statement.
    Gets the predicate of this statement.
    Gets the subject of this statement.
    int
    Computes the hash code of this statement.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • subject

      protected final R extends Resource subject
    • predicate

      protected final I extends IRI predicate
    • object

      protected final V extends Value object
    • context

      protected final R extends Resource context
  • Constructor Details

    • GenericStatement

      protected GenericStatement(R subject, I predicate, V object, R context)
      Creates a new Statement with the supplied subject, predicate and object for the specified associated context.

      Note that creating an 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.
      context - The statement's context, null to indicate no context is associated.
  • Method Details