Class CombUtil
- java.lang.Object
-
- com.github.f4b6a3.uuid.util.nonstandard.CombUtil
-
public final class CombUtil extends Object
Utility that provides methods for extracting time from COMBs.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longextractPrefix(UUID comb)Get the prefix from a Prefix COMB.static InstantextractPrefixInstant(UUID comb)Get the instant from a Prefix COMB.static longextractSuffix(UUID comb)Get the suffix from a Suffix COMB.static InstantextractSuffixInstant(UUID comb)Get the instant from a Suffix COMB.
-
-
-
Method Detail
-
extractPrefix
public static long extractPrefix(UUID comb)
Get the prefix from a Prefix COMB. The value returned is equivalent to the number of milliseconds since 1970-01-01 (Unix epoch).- Parameters:
comb- a Prefix COMB- Returns:
- the prefix (the Unix milliseconds)
-
extractSuffix
public static long extractSuffix(UUID comb)
Get the suffix from a Suffix COMB. The value returned is equivalent to the number of milliseconds since 1970-01-01 (Unix epoch).- Parameters:
comb- a Suffix COMB- Returns:
- the suffix (the Unix milliseconds)
-
extractPrefixInstant
public static Instant extractPrefixInstant(UUID comb)
Get the instant from a Prefix COMB.- Parameters:
comb- a Prefix COMB- Returns:
Instant
-
-