![JAR search and dependency download from the Maven repository](/logo.png)
com.github.devswork.utils.UUIDUtil Maven / Gradle / Ivy
The newest version!
/**
*
*/
package com.github.devswork.utils;
import java.util.UUID;
/**
* @author devswork
*/
public class UUIDUtil {
public static long getUUIDLong() { return Math.abs(UUID.randomUUID().getLeastSignificantBits()); }
public static long getAbsUUIDLong() {
return Math.abs(getUUIDLong());
}
public static String getUUIDString() {
return UUID.randomUUID().toString().replaceAll("-","");
}
private UUID uuID = UUID.randomUUID();
public String getInstanceUUIDString(){
return uuID.toString();
}
public long getInstanceUUIDLong(){
return uuID.getMostSignificantBits();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy