| Modifier and Type | Field and Description |
|---|---|
static UrnCodec |
INSTANCE
A shared immutable instance.
|
| Constructor and Description |
|---|
UrnCodec() |
| Modifier and Type | Method and Description |
|---|---|
UUID |
decode(String urn)
Get a UUID from a URN string.
|
String |
encode(UUID uuid)
Get a URN string from a UUID.
|
static boolean |
isUuidUrn(String urn)
Check if a URN string is a UUID URN.
|
public static final UrnCodec INSTANCE
public String encode(UUID uuid)
encode in interface UuidCodec<String>uuid - a UUIDInvalidUuidException - if the argument is invalidpublic UUID decode(String urn)
decode in interface UuidCodec<String>urn - a URN stringInvalidUuidException - if the argument is invalidpublic static boolean isUuidUrn(String urn)
urn - a stringCopyright © 2024. All rights reserved.