@Test public void newUID() { for (int i = 0; i < 10_000; i++) { UID uid = UID.newUID(); assertTrue(UID.isUID(uid.toString())); assertThat(UID.encodeB64(UID.decodeB64(uid.toString())), is(equalTo(uid.toString()))); assertThat(UID.encodeB64(UID.decodeB64(uid.toString())), is(equalTo(uid.toString()))); assertThat(UID.valueOf(uid.toString()).asUUID(), is(equalTo(uid.asUUID()))); assertThat(UID.fromBytes(uid.toBytes()), is(equalTo(uid))); } }
public static UID newUID() { return new UID(UUID.randomUUID()); }
UID implements java.io.Serializable, Comparable<UID> { public static UID newUID() { return new UID(UUID.randomUUID()); } }
UID implements java.io.Serializable, Comparable<UID> { public static UID newUID() { return new UID(UUID.randomUUID()); } private  UID(UUID value); }
UID implements java.io.Serializable, Comparable<UID> { public static UID newUID() { return new UID(UUID.randomUUID()); } private  UID(UUID value); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override int compareTo(UID o); UUID asUUID(); static UID valueOf(String v); static UID from(UUID v); static UID newUID(); static UID newUID(Random r); static boolean isUID(String s); byte[] toBytes(); static UID fromBytes(byte[] bytes); }
UID implements java.io.Serializable, Comparable<UID> { public static UID newUID() { return new UID(UUID.randomUUID()); } private  UID(UUID value); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override int compareTo(UID o); UUID asUUID(); static UID valueOf(String v); static UID from(UUID v); static UID newUID(); static UID newUID(Random r); static boolean isUID(String s); byte[] toBytes(); static UID fromBytes(byte[] bytes);  }