@Test public void testCreate() { final UUID id = IdUtils.create(); assertNotNull(id); }
public static UUID create() { final byte[] bytes = new byte[16]; RANDOM.nextBytes(bytes); final long time = System.currentTimeMillis(); for (int i = 0; i < 6; i++) { bytes[i] = (byte) ((time >> (40 - i * 8)) & 0xFF); } return fromBytes(bytes); }
IdUtils { public static UUID create() { final byte[] bytes = new byte[16]; RANDOM.nextBytes(bytes); final long time = System.currentTimeMillis(); for (int i = 0; i < 6; i++) { bytes[i] = (byte) ((time >> (40 - i * 8)) & 0xFF); } return fromBytes(bytes); } }
IdUtils { public static UUID create() { final byte[] bytes = new byte[16]; RANDOM.nextBytes(bytes); final long time = System.currentTimeMillis(); for (int i = 0; i < 6; i++) { bytes[i] = (byte) ((time >> (40 - i * 8)) & 0xFF); } return fromBytes(bytes); } IdUtils(); }
IdUtils { public static UUID create() { final byte[] bytes = new byte[16]; RANDOM.nextBytes(bytes); final long time = System.currentTimeMillis(); for (int i = 0; i < 6; i++) { bytes[i] = (byte) ((time >> (40 - i * 8)) & 0xFF); } return fromBytes(bytes); } IdUtils(); static UUID create(); static UUID tryParse(final String str); static byte[] toBytes(final UUID id); static UUID fromBytes(final byte[] b); }
IdUtils { public static UUID create() { final byte[] bytes = new byte[16]; RANDOM.nextBytes(bytes); final long time = System.currentTimeMillis(); for (int i = 0; i < 6; i++) { bytes[i] = (byte) ((time >> (40 - i * 8)) & 0xFF); } return fromBytes(bytes); } IdUtils(); static UUID create(); static UUID tryParse(final String str); static byte[] toBytes(final UUID id); static UUID fromBytes(final byte[] b);  }