Uid implements Serializable { @SuppressWarnings({"unchecked", "UnusedParameters"}) @Nonnull public <T> Uid<T> as(@Nonnull final Class<T> ignored) { return (Uid<T>) this; } 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 testAs() { LOG.info("testAs"); final Uid<Long> a = new Uid<>(); final Uid<Integer> b = a.as(Integer.class); Assert.assertTrue(a.equals(b)); }