WeakValue extends WeakReference<T> implements Weak<T> { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof Weak<?>)) { return false; } return Objects.equals(get(), ((Weak<?>) other).or(null)); } WeakValue(T referent); @Override Weak<T> filter(Predicate<? super T> predicate); @Override Weak<U> flatMap(Function<? super T, ? extends Weak<? extends U>> mapper); @Override Weak<U> map(Function<? super T, ? extends U> mapper); @Override Weak<T> orElse(Supplier<? extends Weak<? extends T>> other); @Override T or(T other); @Override T or(Supplier<T> other); @Override T orThrow(); @Override T orThrow(Supplier<? extends E> exception); @Override void ifPresent(Consumer<? super T> action); @Override void ifPresent(Consumer<? super T> action, Runnable otherwise); @Override boolean isPresent(); @Override Stream<T> stream(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }
@Test void equals() { assertFalse(WEAK.equals("string")); }