Constructor and Description |
---|
TripleImpl(BlankNodeOrIRI subject,
IRI predicate,
RDFTerm object)
Creates a new
TripleImpl . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
RDFTerm |
getObject() |
IRI |
getPredicate() |
BlankNodeOrIRI |
getSubject() |
int |
hashCode()
The hash code is computed as follow
(subject.hashCode() >> 1) ^ predicate.hashCode() ^ object.hashCode() << 1)
|
String |
toString() |
public TripleImpl(BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
TripleImpl
.subject
- the subject.predicate
- the predicate.object
- the object.IllegalArgumentException
- if an attribute is null
.public boolean equals(Object obj)
public int hashCode()
Triple
Note that the hash returned is computed including the hash of BNodes, so it is not blank-node blind as in Graph.
This would have to change if triple should extend Graph
public BlankNodeOrIRI getSubject()
getSubject
in interface Triple
public IRI getPredicate()
getPredicate
in interface Triple
Copyright © 2015–2022 The Apache Software Foundation. All rights reserved.