Package org.uberfire.commons.uuid
Class UUID
- java.lang.Object
-
- org.uberfire.commons.uuid.UUID
-
public class UUID extends Object
Can be used to make UUID Strings.
-
-
Constructor Summary
Constructors Constructor Description UUID()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringuuid()Generate a RFC4122, version 4 ID.static Stringuuid(int len)Generate a random uuid of the specified length.static Stringuuid(int len, int radix)Generate a random uuid of the specified length, and radix.
-
-
-
Method Detail
-
uuid
public static String uuid(int len)
Generate a random uuid of the specified length. Example: uuid(15) returns "VcydxgltxrVZSTV"- Parameters:
len- the desired number of characters
-
uuid
public static String uuid(int len, int radix)
Generate a random uuid of the specified length, and radix. Examples:- uuid(8, 2) returns "01001010" (8 character ID, base=2)
- uuid(8, 10) returns "47473046" (8 character ID, base=10)
- uuid(8, 16) returns "098F4D35" (8 character ID, base=16)
- Parameters:
len- the desired number of charactersradix- the number of allowable values for each character (must be <= 62)
-
uuid
public static String uuid()
Generate a RFC4122, version 4 ID. Example: "92329D39-6F5C-4520-ABFC-AAB64544E172"
-
-