public class SimpleTriple extends AbstractTriple
Triple
interface.SimpleValueFactory
,
Serialized FormModifier | Constructor and Description |
---|---|
protected |
SimpleTriple(Resource subject,
IRI predicate,
Value object)
Creates a new Triple with the supplied subject, predicate and object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
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.
|
String |
stringValue()
Returns the String-value of a Value object.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isResource
protected SimpleTriple(Resource subject, IRI predicate, Value object)
Note that creating SimpleStatement objects directly via this constructor is not the recommended approach.
Instead, use an instance of ValueFactory
to create new Triple objects.
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.SimpleValueFactory.createTriple(Resource, IRI, Value)
public Resource getSubject()
Triple
public IRI getPredicate()
Triple
public Value getObject()
Triple
public String stringValue()
Value
Literal
's label, a
IRI
's URI or a BNode
's ID.stringValue
in interface Value
stringValue
in class AbstractTriple
public String toString()
toString
in class AbstractTriple
public boolean equals(Object o)
Triple
equals
in interface Triple
equals
in class AbstractTriple
o
- the object to compare this triple totrue
if the other
object is an instance of Triple
and if their
subjects, predicates and objects are equal; false
otherwisepublic int hashCode()
Triple
hashCode
in interface Triple
hashCode
in class AbstractTriple
Objects.hash
(
Triple.getSubject()
, Triple.getPredicate()
, Triple.getObject()
)Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.