Package com.globalmentor.model
Class UUIDs
- java.lang.Object
-
- com.globalmentor.model.UUIDs
-
public class UUIDs extends java.lang.Object
Utilities for manipulating a universally unique identifier (UUID).- Author:
- Garret Wilson
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
UUID_URN_NAMESPACE
The UUID URN namespace identifier "uuid".
-
Constructor Summary
Constructors Constructor Description UUIDs()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
toHexString(java.util.UUID uuid)
Constructs a string of hexadecimal characters equivalent to the return value ofUUID.toString()
with all non-digits removed.static java.net.URI
toURI(java.util.UUID uuid)
Creates a URI from the UUID in the formurn:uuid:uuid
.
-
-
-
Field Detail
-
UUID_URN_NAMESPACE
public static final java.lang.String UUID_URN_NAMESPACE
The UUID URN namespace identifier "uuid".- See Also:
- Constant Field Values
-
-
Method Detail
-
toHexString
public static java.lang.String toHexString(java.util.UUID uuid)
Constructs a string of hexadecimal characters equivalent to the return value ofUUID.toString()
with all non-digits removed.- Parameters:
uuid
- The UUID from which to construct a hex string.- Returns:
- A pure hex string representing the UUID.
-
toURI
public static java.net.URI toURI(java.util.UUID uuid)
Creates a URI from the UUID in the formurn:uuid:uuid
.- Parameters:
uuid
- The UUID.- Returns:
- A URI representing the UUID.
- See Also:
- RFC 4122: A Universally Unique IDentifier (UUID) URN Namespace
-
-