class TransparentEqualsWeakReference extends WeakReference<T> {

    @Override
    @SuppressWarnings("PMD.CompareObjectsWithEquals")
    public boolean equals(Object obj)
    {
        if (this == obj)
        {
            return true;
        }
        if (obj == null || getClass() != obj.getClass())
        {
            return false;
        }
        TransparentEqualsWeakReference<?> other = (TransparentEqualsWeakReference<?>)obj;
        if (myHashCode != other.myHashCode)
        {
            return false;
        }
        T referent = get();
        Object otherReferent = other.get();
        return referent == otherReferent || referent != null && referent.equals(otherReferent);
    }

    public  TransparentEqualsWeakReference(T referent);
    public  TransparentEqualsWeakReference(T referent, ReferenceQueue<? super T> q);

}