java.lang.Object
java.lang.Record
org.apache.jena.rfc3986.URN
URN structure, following RFC 8141.
The URNComponents may be null, indicating "none".
Allow international characters in NSS and URNComponents.
See ParseURN.parseURN(String) to create a URN object from a string.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionURN(String scheme, String NID, String NSS, URNComponents components) Creates an instance of aURNrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecomponentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.NID()Returns the value of theNIDrecord component.NSS()Returns the value of theNSSrecord component.scheme()Returns the value of theschemerecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
URN
Creates an instance of aURNrecord class.- Parameters:
scheme- the value for theschemerecord componentNID- the value for theNIDrecord componentNSS- the value for theNSSrecord componentcomponents- the value for thecomponentsrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
scheme
Returns the value of theschemerecord component.- Returns:
- the value of the
schemerecord component
-
NID
Returns the value of theNIDrecord component.- Returns:
- the value of the
NIDrecord component
-
NSS
Returns the value of theNSSrecord component.- Returns:
- the value of the
NSSrecord component
-
components
Returns the value of thecomponentsrecord component.- Returns:
- the value of the
componentsrecord component
-