@Test public void retag() { Const<String, Integer> val = Const.of("hello world!"); Const<String, Float> retag = val.retag(); assertEquals(retag, val); assertEquals(retag.get(), val.get()); }
@SuppressWarnings("unchecked") public <B> Const<T, B> retag() { return (Const<T, B>) this; }
Const implements ConstOf<T, A>, Serializable { @SuppressWarnings("unchecked") public <B> Const<T, B> retag() { return (Const<T, B>) this; } }
Const implements ConstOf<T, A>, Serializable { @SuppressWarnings("unchecked") public <B> Const<T, B> retag() { return (Const<T, B>) this; } private  Const(T value); }
Const implements ConstOf<T, A>, Serializable { @SuppressWarnings("unchecked") public <B> Const<T, B> retag() { return (Const<T, B>) this; } private  Const(T value); T get(); @SuppressWarnings("unchecked") Const<T, B> retag(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static Const<T, A> of(T value); }
Const implements ConstOf<T, A>, Serializable { @SuppressWarnings("unchecked") public <B> Const<T, B> retag() { return (Const<T, B>) this; } private  Const(T value); T get(); @SuppressWarnings("unchecked") Const<T, B> retag(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static Const<T, A> of(T value);  }