Package org.eclipse.rdf4j.model.impl
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
@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:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGenericStatement(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)RgetContext()VgetObject()IgetPredicate()RgetSubject()inthashCode()StringtoString()
-
-
-
Constructor Detail
-
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 usingSimpleValueFactory.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 Detail
-
getSubject
public R getSubject()
- Specified by:
getSubjectin interfaceStatement
-
getPredicate
public I getPredicate()
- Specified by:
getPredicatein interfaceStatement
-
getContext
public R getContext()
- Specified by:
getContextin interfaceStatement
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
-
-