@Test public void equalsIsAppropriate() { assertThat(CacheableOptional.of("my-test"), is(CacheableOptional.of("my-test"))); assertThat(CacheableOptional.of("my-test"), is(not(CacheableOptional.of("not-my-test")))); }
public static <T extends Serializable> CacheableOptional<T> of(final T value) { return new CacheableOptional<>(value); }
CacheableOptional implements Cacheable { public static <T extends Serializable> CacheableOptional<T> of(final T value) { return new CacheableOptional<>(value); } }
CacheableOptional implements Cacheable { public static <T extends Serializable> CacheableOptional<T> of(final T value) { return new CacheableOptional<>(value); } private  CacheableOptional(T value); }
CacheableOptional implements Cacheable { public static <T extends Serializable> CacheableOptional<T> of(final T value) { return new CacheableOptional<>(value); } private  CacheableOptional(T value); static CacheableOptional<T> of(final T value); @SuppressWarnings("OptionalUsedAsFieldOrParameterType") static CacheableOptional<T> from(final Optional<T> value); T get(); boolean isPresent(); boolean isAbsent(); Optional<T> toOptional(); @Override boolean equals(Object o); @Override int hashCode(); @Override int getCachedSize(); }
CacheableOptional implements Cacheable { public static <T extends Serializable> CacheableOptional<T> of(final T value) { return new CacheableOptional<>(value); } private  CacheableOptional(T value); static CacheableOptional<T> of(final T value); @SuppressWarnings("OptionalUsedAsFieldOrParameterType") static CacheableOptional<T> from(final Optional<T> value); T get(); boolean isPresent(); boolean isAbsent(); Optional<T> toOptional(); @Override boolean equals(Object o); @Override int hashCode(); @Override int getCachedSize();  }