Package net.lucypoulton.squirtgun.util
Class UuidUtils
java.lang.Object
net.lucypoulton.squirtgun.util.UuidUtils
Various utilities for formatting UUIDs.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
UuidUtils
public UuidUtils()
-
-
Method Details
-
toString
Converts a UUID to a string, removing hyphens.- Parameters:
uuid- the UUID to convert to a string- Returns:
- the string form of a UUID with no hyphens.
-
fromString
Converts a UUID, either with or without dashes, to a string. Hyphens are optional.- Parameters:
name- the string to parse- Returns:
- the parsed UUID
- Throws:
IllegalArgumentException- if the provided string is incorrectly formatted
-