List of usage examples for java.util UUID toString
public String toString()
From source file:Main.java
/** * Constructs a key string from the received deviceId and the appId * //from www. j av a 2 s . c om * @param deviceId * @param appId * @return key */ public static String getKey(String deviceId, UUID appId) { String appIdStr = appId.toString().replace("-", ""); return deviceId + "_" + appIdStr.toUpperCase(Locale.ENGLISH); }
From source file:Main.java
/** * Assigns a random UUID//from w w w .java2s. co m * @return String the random UUID */ public static String assignUUID() { UUID uuid = UUID.randomUUID(); return uuid.toString(); }
From source file:com.labimo.licensor.LicenseUtilsTest.java
public static String getUuid() { UUID uuid = UUID.randomUUID(); return uuid.toString(); }
From source file:Main.java
private static String generateUniqueIdentifier() { String strReturn = null;//from w w w . j a v a2s . com UUID ui = UUID.randomUUID(); strReturn = ui.toString(); return strReturn; }
From source file:Main.java
public static String uuidToString(UUID uuid) { String uuidString = uuid.toString(); if (uuidString.startsWith(BASE_UUID_START) && uuidString.endsWith(BASE_UUID_END)) { return uuidString.substring(4, 8); }/*from ww w . j a v a 2s .co m*/ return uuidString; }
From source file:Main.java
public static String uuidToString(UUID uuid) { String longUUID = uuid.toString(); Pattern pattern = Pattern.compile("0000(.{4})-0000-1000-8000-00805f9b34fb", Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(longUUID); if (matcher.matches()) { // 16 bit UUID return matcher.group(1); } else {//from www . ja va 2s . c om return longUUID; } }
From source file:Main.java
private static String getMyUUID() { UUID uuid = UUID.randomUUID(); String uniqueId = uuid.toString(); return uniqueId; }
From source file:Main.java
public static String get32RandomString() { UUID uuid = UUID.randomUUID(); String uuidStr = uuid.toString().replace("-", ""); return uuidStr; }
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 boolean mustIgnoreKey(UUID ignoredKey, String rowKey) { return ignoredKey != null && ignoredKey.toString().equals(rowKey); }