Class JsonLdQuadImpl
java.lang.Object
org.apache.commons.rdf.jsonldjava.JsonLdQuadLikeImpl<BlankNodeOrIRI,IRI,RDFTerm,BlankNodeOrIRI>
org.apache.commons.rdf.jsonldjava.JsonLdQuadImpl
- All Implemented Interfaces:
Quad
,QuadLike<BlankNodeOrIRI>
,TripleLike
,JsonLdQuad
,JsonLdQuadLike<BlankNodeOrIRI>
,JsonLdTripleLike
final class JsonLdQuadImpl
extends JsonLdQuadLikeImpl<BlankNodeOrIRI,IRI,RDFTerm,BlankNodeOrIRI>
implements JsonLdQuad
-
Constructor Summary
ConstructorsConstructorDescriptionJsonLdQuadImpl
(com.github.jsonldjava.core.RDFDataset.Quad quad, String blankNodePrefix) -
Method Summary
Methods inherited from class org.apache.commons.rdf.jsonldjava.JsonLdQuadLikeImpl
asJsonLdQuad, getGraphName, getObject, getPredicate, getSubject, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.commons.rdf.jsonldjava.JsonLdTripleLike
asJsonLdQuad
Methods inherited from interface org.apache.commons.rdf.api.Quad
asTriple, getGraphName, getObject, getPredicate, getSubject
-
Constructor Details
-
JsonLdQuadImpl
JsonLdQuadImpl(com.github.jsonldjava.core.RDFDataset.Quad quad, String blankNodePrefix)
-
-
Method Details
-
equals
Description copied from interface:Quad
Check it this Quad is equal to another Quad.Two Quads are equal if and only if their
Quad.getGraphName()
,Quad.getSubject()
,Quad.getPredicate()
andQuad.getObject()
are equal.Implementations MUST also override
Quad.hashCode()
so that two equal Quads produce the same hash code.Note that a
Quad
MUST NOT be equal to aTriple
, even if this Quad'sQuad.getGraphName()
isOptional.empty()
. To test triple-like equivalence, callers can use:Quad q1; Triple t2; q1.asTriple().equals(t2));
-
hashCode
public int hashCode()Description copied from interface:Quad
Calculate a hash code for this Quad.The returned hash code MUST be equal to the result of
Objects.hash(Object...)
with the argumentsQuad.getSubject()
,Quad.getPredicate()
,Quad.getObject()
,Quad.getGraphName()
.This method MUST be implemented in conjunction with
Quad.equals(Object)
so that two equalQuad
s produce the same hash code.
-