class UnwrappedWeakReference extends WeakReference<T> {

    @Override
    public boolean equals(Object obj) {
        // unwrap both objects!
        T thisObject = this.get();
        
        // if the other object is also a WeakRefe
        if (obj instanceof WeakReference) {
            obj = ((WeakReference)obj).get();
        }
        
        // check if anything is null (was garbage collected)
        if (thisObject == null) {
            if (obj == null) {
                return true;
            } else {
                return false;
            }
        }
        
        return thisObject.equals(obj);
    }

    public  UnwrappedWeakReference(T ref);

}