Java Utililty Methods UUID Create

List of utility methods to do UUID Create

Description

The list of methods to do UUID Create are organized into topic(s).

Method

Stringgenerate()
generate
return generate(false);
Stringgenerate()
generate
String s = UUID.randomUUID().toString();
return s.substring(0, 8) + s.substring(9, 13) + s.substring(14, 18) + s.substring(19, 23)
        + s.substring(24, 36);
Stringgenerate()
generate
UUID uuid = UUID.randomUUID();
return uuid.toString().replace("-", "");
Stringgenerate()
Generates a unique identifier
UUID uuid = UUID.randomUUID();
return uuid.toString().replaceAll("-", "").toUpperCase();
StringgenerateApiAccesskeyId()
generate Api Accesskey Id
String uuid = generateUUID();
return "ID" + uuid.substring(0, 10);
String[]generateAppIds(int noOfAppIdsToGenerate)
generate App Ids
List<String> appIds = new ArrayList<>();
for (int i = 0; i < noOfAppIdsToGenerate; i++) {
    UUID uuid = UUID.randomUUID();
    genAppIds.add(uuid.toString());
    appIds.add(uuid.toString());
return appIds.toArray(new String[0]);
StringgenerateAttributeId()
generate Attribute Id
return getAttributeIdPrefix() + generateUniqueId();
StringgenerateBoundary(final String value)
generate Boundary
return value + "_" + UUID.randomUUID().toString();
StringgenerateClientId()
Generates a random UUID suitable for use as MQTT client ID.
return UUID.randomUUID().toString();
StringgenerateConnectionId()
generate Connection Id
return UUID.randomUUID().toString();