Share via


SparseArray.ContentHashCode Method

Definition

Returns a hash code value for the contents of this SparseArray, combining the Objects#hashCode(Object) result of all its keys and values.

[Android.Runtime.Register("contentHashCode", "()I", "GetContentHashCodeHandler", ApiSince=31)]
public virtual int ContentHashCode ();
[<Android.Runtime.Register("contentHashCode", "()I", "GetContentHashCodeHandler", ApiSince=31)>]
abstract member ContentHashCode : unit -> int
override this.ContentHashCode : unit -> int

Returns

Attributes

Remarks

Returns a hash code value for the contents of this SparseArray, combining the Objects#hashCode(Object) result of all its keys and values.

For backwards compatibility, Object#hashCode() cannot be implemented, so this serves as a manually invoked alternative.

Java documentation for android.util.SparseArray.contentHashCode().

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