@Test public void newUID_seed() { UID[] uids1 = new UID[10_000]; Random r = new Random(0); for (int i = 0; i < 10_000; i++) { uids1[i] = UID.newUID(r); } UID[] uids2 = new UID[10_000]; r = new Random(0); for (int i = 0; i < 10_000; i++) { uids2[i] = UID.newUID(r); } assertArrayEquals(uids1, uids2); }
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);  }