@Override public boolean equals(Object obj) { if (!(obj instanceof HashableWeakReference)) return false; U referent = super.get(); @SuppressWarnings("unchecked") Object other = ((HashableWeakReference<?>) obj).get(); if (referent == null) return other == null; return referent.equals(other); }
@Override public boolean equals(Object obj) { return referent.equals(obj); }