Package org.eclipse.rdf4j.model.impl
Class SimpleTriple
- java.lang.Object
-
- org.eclipse.rdf4j.model.base.AbstractTriple
-
- org.eclipse.rdf4j.model.impl.SimpleTriple
-
- All Implemented Interfaces:
Serializable,Resource,Triple,Value
public class SimpleTriple extends AbstractTriple
A simple default implementation of theTripleinterface.- Author:
- Pavel Mihaylov
- See Also:
SimpleValueFactory, Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSimpleTriple(Resource subject, IRI predicate, Value object)Creates a new Triple with the supplied subject, predicate and object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)ValuegetObject()IRIgetPredicate()ResourcegetSubject()inthashCode()StringstringValue()StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.rdf4j.model.Resource
isResource
-
-
-
-
Constructor Detail
-
SimpleTriple
protected SimpleTriple(Resource subject, IRI predicate, Value object)
Creates a new Triple with the supplied subject, predicate and object.Note that creating SimpleStatement objects directly via this constructor is not the recommended approach. Instead, use an instance of
ValueFactoryto create new Triple objects.- Parameters:
subject- The triple's subject, must not be null.predicate- The triple's predicate, must not be null.object- The triple's object, must not be null.- See Also:
SimpleValueFactory.createTriple(Resource, IRI, Value)
-
-
Method Detail
-
getSubject
public Resource getSubject()
-
getPredicate
public IRI getPredicate()
-
getObject
public Value getObject()
-
stringValue
public String stringValue()
- Specified by:
stringValuein interfaceValue- Overrides:
stringValuein classAbstractTriple
-
toString
public String toString()
- Overrides:
toStringin classAbstractTriple
-
equals
public boolean equals(Object o)
- Specified by:
equalsin interfaceTriple- Overrides:
equalsin classAbstractTriple
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceTriple- Overrides:
hashCodein classAbstractTriple
-
-