-
- Type Parameters:
T- the type encoded to and decoded from.
- All Known Implementing Classes:
Base16Codec,Base32Codec,Base58BtcCodec,Base62Codec,Base64Codec,Base64UrlCodec,BaseNCodec,BinaryCodec,DotNetGuid1Codec,DotNetGuid4Codec,NcnameCodec,SlugCodec,StringCodec,TimeOrderedCodec,UriCodec,UrnCodec
public interface UuidCodec<T>Interface to be implemented by all codecs of this package.All implementations of this interface throw
InvalidUuidExceptionif an invalid argument argument is given.The
RuntimeExceptioncases that can be detected beforehand are translated into anInvalidUuidException.- See Also:
InvalidUuidException
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UUIDdecode(T type)Get a UUID from a generic type.Tencode(UUID uuid)Get a generic type from a UUID.
-
-
-
Method Detail
-
encode
T encode(UUID uuid)
Get a generic type from a UUID.- Parameters:
uuid- a UUID- Returns:
- a generic type
- Throws:
InvalidUuidException- if the argument is invalid
-
decode
UUID decode(T type)
Get a UUID from a generic type.- Parameters:
type- a generic type- Returns:
- a UUID
- Throws:
InvalidUuidException- if the argument is invalid
-
-