Example usage for java.util UUID randomUUID

List of usage examples for java.util UUID randomUUID

Introduction

In this page you can find the example usage for java.util UUID randomUUID.

Prototype

public static UUID randomUUID() 

Source Link

Document

Static factory to retrieve a type 4 (pseudo randomly generated) UUID.

Usage

From source file:Main.java

public synchronized static String orderNumGenerator() {
    UUID uuid = UUID.randomUUID();
    return uuid.toString();
}

From source file:Main.java

public static String uniqueId() {
    return UUID.randomUUID().toString();
}

From source file:Main.java

public static String randomUUID() {
    return UUID.randomUUID().toString();
}

From source file:Main.java

public static byte[] randomUUID() {
    UUID uuid = UUID.randomUUID();
    long hi = uuid.getMostSignificantBits();
    long lo = uuid.getLeastSignificantBits();
    return ByteBuffer.allocate(16).putLong(hi).putLong(lo).array();
}

From source file:Main.java

public static String createUUID() {
    return UUID.randomUUID().toString();
}

From source file:Main.java

public static String getUUID4() {
    return UUID.randomUUID().toString();
}

From source file:Main.java

public static String genUUid() {
    UUID uuid = UUID.randomUUID();
    return String.valueOf(uuid).replace("-", "");
}

From source file:Main.java

public static String nextValue() {
    return UUID.randomUUID().toString();
}

From source file:Main.java

public static String randomUid() {
    return UUID.randomUUID().toString().replace("-", "").toLowerCase();
}

From source file:Main.java

public static File generateKeyFile() {
    return new File("data/" + UUID.randomUUID().toString());
}