- java.lang.Object
-
- com.github.f4b6a3.uuid.util.CombUtil
-
public final class CombUtil extends Object
Utility for extracting time from COMB GUIDs.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longgetPrefix(UUID comb)Returns the prefix from a Prefix COMB.static InstantgetPrefixInstant(UUID comb)Returns the instant from a Prefix COMB.static longgetSuffix(UUID comb)Returns the suffix from a Suffix COMB.static InstantgetSuffixInstant(UUID comb)Returns the instant from a Suffix COMB.
-
-
-
Method Detail
-
getPrefix
public static long getPrefix(UUID comb)
Returns 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)
-
getSuffix
public static long getSuffix(UUID comb)
Returns 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)
-
getPrefixInstant
public static Instant getPrefixInstant(UUID comb)
Returns the instant from a Prefix COMB.- Parameters:
comb- a Prefix COMB- Returns:
Instant
-
-