UUID Class
Contains methods to randomly generate a version 4 universally unique identifier (UUID), compare UUIDs, and convert UUID instance to a string.
The UUID is generated using a cryptographically strong pseudo-random number generator and is represented as 32 hexadecimal values.
The following are methods for UUID.
-
Compares a UUID instance with the specified object and returns true if both are equal. Otherwise, returns false.
-
Converts a 32 character hexadecimal string representation of a UUID to a UUID instance.
-
Returns the hashcode corresponding to the UUID instance.
-
A static method that randomly generates a version 4 UUID.
-
Returns the string representation of the UUID instance.
Compares a UUID instance with the specified object and returns true if both are equal. Otherwise, returns false.
public Boolean equals(Object obj)
- obj: Type: Object The UUID object to be compared.
Type: Boolean
Converts a 32 character hexadecimal string representation of a UUID to a UUID instance.
public static System.UUID fromString(String str)
- str: Type: String
Type: System.UUID
Returns the hashcode corresponding to the UUID instance.
public Integer hashCode()
Type: Integer
A static method that randomly generates a version 4 UUID.
public static System.UUID randomUUID()
Type: System.UUID
A 32 hexadecimal value of the UUID generated.
Returns the string representation of the UUID instance.
public String toString()
Type: String