Class IRIImpl
java.lang.Object
org.apache.commons.rdf.rdf4j.impl.AbstractRDFTerm<org.eclipse.rdf4j.model.IRI>
org.apache.commons.rdf.rdf4j.impl.IRIImpl
- All Implemented Interfaces:
BlankNodeOrIRI
,IRI
,RDFTerm
,RDF4JBlankNodeOrIRI
,RDF4JIRI
,RDF4JTerm
-
Field Summary
Fields inherited from class org.apache.commons.rdf.rdf4j.impl.AbstractRDFTerm
value
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Check it this RDFTerm is equal to another RDFTerm.Return the IRI encoded as a native Unicode String.
The returned string must not include URL-encoding to escape non-ASCII characters.int
hashCode()
Calculate a hash code for this RDFTerm.Return the term serialised as specified by the RDF-1.1 N-Triples Canonical form.toString()
Methods inherited from class org.apache.commons.rdf.rdf4j.impl.AbstractRDFTerm
asValue
-
Constructor Details
-
IRIImpl
IRIImpl(org.eclipse.rdf4j.model.IRI iri)
-
-
Method Details
-
equals
Description copied from interface:RDFTerm
Check it this RDFTerm is equal to another RDFTerm.If this object is an
IRI
, equality is checked usingIRI.equals(Object)
, or if this object is aBlankNode
, equality is checked usingBlankNode.equals(Object)
, or if this object is aLiteral
, equality is checked usingLiteral.equals(Object)
.Implementations MUST also override
RDFTerm.hashCode()
so that two equal Literals produce the same hash code. -
getIRIString
Description copied from interface:IRI
Return the IRI encoded as a native Unicode String.
The returned string must not include URL-encoding to escape non-ASCII characters.- Specified by:
getIRIString
in interfaceIRI
- Returns:
- The IRI encoded as a native Unicode String.
-
hashCode
public int hashCode()Description copied from interface:RDFTerm
Calculate a hash code for this RDFTerm.As an
RDFTerm
is immutable, this method will always return the same hashCode over the lifetime of this object.This method MUST be implemented in conjunction with
RDFTerm.equals(Object)
so that two equal RDFTerm produce the same hash code. -
ntriplesString
Description copied from interface:RDFTerm
Return the term serialised as specified by the RDF-1.1 N-Triples Canonical form.- Specified by:
ntriplesString
in interfaceRDFTerm
- Returns:
- The term serialised as RDF-1.1 N-Triples.
- See Also:
-
toString
-