Class InternedIRI
java.lang.Object
org.eclipse.rdf4j.model.base.InternedIRI
- All Implemented Interfaces:
Serializable, IRI, Resource, Value
An IRI implementation that interns the stringValue so that two objects can be compared by their stringValue
reference. Must only be used for IRIs that are effectively ´public static final´ and only for a very limited number
of objects because string interning affects the GC root set
(https://shipilev.net/jvm/anatomy-quarks/10-string-intern/).
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares this IRI to another object.Gets the local name part of this IRI.Gets the namespace part of this IRI.inthashCode()Computes the hash code of this IRI.private voidReturns the String-value of a Value object.toString()private voidprivate voidwriteToPrivateFinalField(int value, String fieldName) private voidwriteToPrivateFinalField(String value, String fieldName) Methods inherited from interface Resource
isResource
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
namespace
-
localName
-
stringValue
-
hashCode
private final int hashCode
-
-
Constructor Details
-
InternedIRI
-
-
Method Details
-
stringValue
-
getNamespace
Description copied from interface:IRIGets the namespace part of this IRI.The namespace is defined as per the algorithm described in the class documentation.
- Specified by:
getNamespacein interfaceIRI- Returns:
- the namespace of this IRI
-
getLocalName
Description copied from interface:IRIGets the local name part of this IRI.The local name is defined as per the algorithm described in the class documentation.
- Specified by:
getLocalNamein interfaceIRI- Returns:
- the local name of this IRI
-
toString
-
equals
Description copied from interface:IRICompares this IRI to another object.- Specified by:
equalsin interfaceIRI- Overrides:
equalsin classObject- Parameters:
o- the object to compare this IRI to- Returns:
true, if the other object is an instance ofIRIand their string values are equal;false, otherwise
-
hashCode
-
writeObject
- Throws:
IOException
-
readObject
- Throws:
ClassNotFoundExceptionIOException
-
writeToPrivateFinalField
-
writeToPrivateFinalField
-