List of usage examples for java.util UUID randomUUID
public static UUID randomUUID()
From source file:Main.java
public static String get32UUID() { return UUID.randomUUID().toString().replaceAll("-", ""); }
From source file:Main.java
public static String generateID() { UUID id = UUID.randomUUID(); return id.toString(); }
From source file:Main.java
public static String getUniqueKey() { UUID uuid = UUID.randomUUID(); return uuid.toString(); }
From source file:Main.java
public static String get36UUID() { UUID uuid = UUID.randomUUID(); String uniqueId = uuid.toString(); return uniqueId; }
From source file:Main.java
private static String generateUniqueIdentifier() { String strReturn = null;/*from www.j a v a2 s . c o m*/ UUID ui = UUID.randomUUID(); strReturn = ui.toString(); return strReturn; }
From source file:Main.java
/** * generate uuid * * @return uuid */ public static String generateUUID() { return UUID.randomUUID().toString().toUpperCase(); }
From source file:Main.java
private static String ensureUniqueness(String desiredName) { return (desiredName + UUID.randomUUID()).replace("-", "_"); // FIXME: this should really be done by calling into the REGISTRY subsystem }
From source file:Main.java
/** * Generates a UUID without dash character ("-") * @return/* w w w .j a v a2 s .c o m*/ */ public static String randomUuidNoDash() { return UUID.randomUUID().toString().replace("-", ""); }
From source file:Main.java
/** * Assigns a random UUID//w w w . j a v a 2 s. c om * @return String the random UUID */ public static String assignUUID() { UUID uuid = UUID.randomUUID(); return uuid.toString(); }
From source file:Main.java
/** * Create a random password. * * @return the password */ public static String createRandomPassword() { return UUID.randomUUID().toString(); }