Freigeben über


Identity.Equals(Object) Method

Definition

Caution

deprecated

Tests for equality between the specified object and this identity.

[Android.Runtime.Register("equals", "(Ljava/lang/Object;)Z", "")]
[System.Obsolete("deprecated")]
public override sealed bool Equals (Java.Lang.Object? identity);
[<Android.Runtime.Register("equals", "(Ljava/lang/Object;)Z", "")>]
[<System.Obsolete("deprecated")>]
override this.Equals : Java.Lang.Object -> bool

Parameters

identity
Object

the object to test for equality with this identity.

Returns

true if the objects are considered equal, false otherwise.

Implements

Attributes

Remarks

Tests for equality between the specified object and this identity. This first tests to see if the entities actually refer to the same object, in which case it returns true. Next, it checks to see if the entities have the same name and the same scope. If they do, the method returns true. Otherwise, it calls #identityEquals(Identity) identityEquals, which subclasses should override.

Java documentation for java.security.Identity.equals(java.lang.Object).

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