Module buralotech.identifier.core
Record Class UUIDIdentifier
java.lang.Object
java.lang.Record
com.buralotech.oss.identifier.uuid.UUIDIdentifier
- Record Components:
text- The textual representation.binary- The binary representation.
- All Implemented Interfaces:
Identifier,Comparable<Identifier>
And identifier has a textual and binary representation.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUUIDIdentifier(String text, byte[] binary) Creates an instance of aUUIDIdentifierrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]binary()Returns the value of thebinaryrecord component.intcompareTo(Identifier other) Compare based on the binary representation.booleanDetermine if two identifiers are equivalent.inthashCode()Calculate a hash code for an identifier.text()Returns the value of thetextrecord component.toString()Get a string representation.
-
Field Details
-
Constructor Details
-
Method Details
-
equals
Determine if two identifiers are equivalent. -
hashCode
public int hashCode()Calculate a hash code for an identifier. -
compareTo
Compare based on the binary representation.- Specified by:
compareToin interfaceComparable<Identifier>- Parameters:
other- the object to be compared.- Returns:
- 0 - if the two identifiers are equivalent
- < 0 -
- > 0 -
-
toString
Get a string representation. -
text
Returns the value of thetextrecord component.- Specified by:
textin interfaceIdentifier- Returns:
- the value of the
textrecord component
-
binary
public byte[] binary()Returns the value of thebinaryrecord component.- Specified by:
binaryin interfaceIdentifier- Returns:
- the value of the
binaryrecord component
-