Sdílet prostřednictvím


ISet.GetHashCode Method

Definition

Returns the hash code value for this set.

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

Returns

the hash code value for this set

Implements

Attributes

Remarks

Returns the hash code value for this set. The hash code of a set is defined to be the sum of the hash codes of the elements in the set, where the hash code of a null element is defined to be zero. This ensures that s1.equals(s2) implies that s1.hashCode()==s2.hashCode() for any two sets s1 and s2, as required by the general contract of Object#hashCode.

Java documentation for java.util.Set.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