Package org.hibernate.testing.util.uuid
Class SafeRandomUUIDGenerator
- java.lang.Object
-
- org.hibernate.testing.util.uuid.SafeRandomUUIDGenerator
-
public class SafeRandomUUIDGenerator extends Object
-
-
Constructor Summary
Constructors Constructor Description SafeRandomUUIDGenerator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isSafeUUID(UUID uuid)
static UUID
safeRandomUUID()
static String
safeRandomUUIDAsString()
-
-
-
Method Detail
-
safeRandomUUID
public static UUID safeRandomUUID()
- Returns:
- A random UUID that is guaranteed not to end with a trailing 0 byte
-
safeRandomUUIDAsString
public static String safeRandomUUIDAsString()
- Returns:
- The String representation of a random UUID that is guaranteed not to end with a trailing 0 byte
-
isSafeUUID
public static boolean isSafeUUID(UUID uuid)
- Parameters:
uuid
- The UUID to be tested- Returns:
- true if the UUID doesn't end with a trailing 0 byte, false otherwise
-
-