Condividi tramite


ArrayMap.IndexOfValue(Object) Method

Definition

Returns an index for which #valueAt would return the specified value, or a negative number if no keys map to the specified value.

[Android.Runtime.Register("indexOfValue", "(Ljava/lang/Object;)I", "", ApiSince=29)]
public int IndexOfValue (Java.Lang.Object? value);
[<Android.Runtime.Register("indexOfValue", "(Ljava/lang/Object;)I", "", ApiSince=29)>]
member this.IndexOfValue : Java.Lang.Object -> int

Parameters

value
Object

Returns

Attributes

Remarks

Returns an index for which #valueAt would return the specified value, or a negative number if no keys map to the specified value. Beware that this is a linear search, unlike lookups by key, and that multiple keys can map to the same value and this will find only one of them.

Java documentation for android.util.ArrayMap.indexOfValue(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