Sdílet prostřednictvím


JavaSystem.IdentityHashCode(Object) Method

Definition

Returns the same hash code for the given object as would be returned by the default method hashCode(), whether or not the given object's class overrides hashCode().

[Android.Runtime.Register("identityHashCode", "(Ljava/lang/Object;)I", "")]
public static int IdentityHashCode (Java.Lang.Object? x);
[<Android.Runtime.Register("identityHashCode", "(Ljava/lang/Object;)I", "")>]
static member IdentityHashCode : Java.Lang.Object -> int

Parameters

x
Object

object for which the hashCode is to be calculated

Returns

the hashCode

Attributes

Remarks

Returns the same hash code for the given object as would be returned by the default method hashCode(), whether or not the given object's class overrides hashCode(). The hash code for the null reference is zero.

Added in JDK1.1.

Java documentation for java.lang.System.identityHashCode(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

See also