다음을 통해 공유


IMapEntry.GetHashCode Method

Definition

Returns the hash code value for this map entry.

[Android.Runtime.Register("hashCode", "()I", "GetGetHashCodeHandler:Java.Util.IMapEntryInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int GetHashCode ();
[<Android.Runtime.Register("hashCode", "()I", "GetGetHashCodeHandler:Java.Util.IMapEntryInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetHashCode : unit -> int

Returns

the hash code value for this map entry

Attributes

Remarks

Returns the hash code value for this map entry. The hash code of a map entry e is defined to be:

(e.getKey()==null   ? 0 : e.getKey().hashCode()) ^
                (e.getValue()==null ? 0 : e.getValue().hashCode())

This ensures that e1.equals(e2) implies that e1.hashCode()==e2.hashCode() for any two Entries e1 and e2, as required by the general contract of Object.hashCode.

Java documentation for java.util.Map.Entry.hashCode().

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