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
final class IRIImpl extends AbstractRDFTerm<org.eclipse.rdf4j.model.IRI> implements RDF4JIRI
-
-
Field Summary
-
Fields inherited from class org.apache.commons.rdf.rdf4j.impl.AbstractRDFTerm
value
-
-
Constructor Summary
Constructors Constructor Description IRIImpl(org.eclipse.rdf4j.model.IRI iri)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Check it this RDFTerm is equal to another RDFTerm.java.lang.String
getIRIString()
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.java.lang.String
ntriplesString()
Return the term serialised as specified by the RDF-1.1 N-Triples Canonical form.java.lang.String
toString()
-
Methods inherited from class org.apache.commons.rdf.rdf4j.impl.AbstractRDFTerm
asValue
-
-
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
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.- Specified by:
equals
in interfaceIRI
- Specified by:
equals
in interfaceRDFTerm
- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- Another object- Returns:
- true if other is a RDFTerm and is equal to this
- See Also:
IRI.equals(Object)
,BlankNode.equals(Object)
,Literal.equals(Object)
-
getIRIString
public java.lang.String 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.- Specified by:
hashCode
in interfaceIRI
- Specified by:
hashCode
in interfaceRDFTerm
- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- a hash code value for this RDFTerm.
- See Also:
IRI.hashCode()
,Literal.hashCode()
,BlankNode.hashCode()
-
ntriplesString
public java.lang.String 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:
- RDF-1.1 N-Triples Canonical form
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-