Package de.xima.fc.utils
Class XUuidUtils
- java.lang.Object
-
- de.xima.fc.utils.XUuidUtils
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisUuidString(String value)Checks if the given string is a valid UUID.static UUIDparseUuidOrNull(String value)Parses the string as aUUID, if possible, or returns null if it cannot be parsed.static StringrandomUuidString()Creates a random UUID and returns it as a string.
-
-
-
Method Detail
-
isUuidString
public static boolean isUuidString(String value)
Checks if the given string is a valid UUID.- Parameters:
value- The string to check.- Returns:
trueif the string is a valid UUID,falseotherwise.
-
parseUuidOrNull
public static UUID parseUuidOrNull(String value)
Parses the string as aUUID, if possible, or returns null if it cannot be parsed.- Parameters:
value- Value to parse.- Returns:
- The UUID represented by the string, or
nullwhen the string does not represent a valid UUID.
-
randomUuidString
public static String randomUuidString()
Creates a random UUID and returns it as a string.- Returns:
- A random UUID as a string.
-
-