Udostępnij za pośrednictwem


Reference.RefersTo(Object) Method

Definition

Tests if the referent of this reference object is obj.

[Android.Runtime.Register("refersTo", "(Ljava/lang/Object;)Z", "", ApiSince=33)]
public bool RefersTo (Java.Lang.Object? obj);
[<Android.Runtime.Register("refersTo", "(Ljava/lang/Object;)Z", "", ApiSince=33)>]
member this.RefersTo : Java.Lang.Object -> bool

Parameters

obj
Object

the object to compare with this reference object's referent

Returns

true if obj is the referent of this reference object

Attributes

Remarks

Tests if the referent of this reference object is obj. Using a nullobj returns true if the reference object has been cleared. Prefer this to a comparison with the result of get.

Java documentation for java.lang.ref.Reference.refersTo(T).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to