Uid implements Serializable { public static boolean isValid(@Nullable final String id) { if (id == null) { return false; } try { new Uid(id); return true; } catch (final IllegalArgumentException ignored) { return false; } } Uid();  Uid(@Nonnull final String uuid); private  Uid(@Nonnull final UUID uuid); static boolean isValid(@Nullable final String id); @Nonnull static Uid<T> fromString(@Nonnull final String id); @Nonnull static Uid<T> fromHexString(@Nonnull final String id); @Nonnull String toHexString(); @SuppressWarnings({"unchecked", "UnusedParameters"}) @Nonnull Uid<T> as(@Nonnull final Class<T> ignored); boolean matchesFromString(@Nonnull final String uid); @Override boolean equals(@Nullable final Object obj); @Override int hashCode(); @Override @Nonnull String toString();  }
@Test public void testIsValid() { LOG.info("testIsValid"); Assert.assertTrue(Uid.isValid("d32b6789-bfbb-4194-87f3-72ce34609902")); Assert.assertTrue(Uid.isValid("0-0-0-0-0")); Assert.assertFalse(Uid.isValid("0-0-0-0-0-0")); Assert.assertFalse(Uid.isValid("d32b6789bfbb419487f372ce34609902")); Assert.assertFalse(Uid.isValid("")); Assert.assertFalse(Uid.isValid(null)); }