Language

AbstractList.LastIndexOf(Object) Method

Definition

Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element.

[Android.Runtime.Register("lastIndexOf", "(Ljava/lang/Object;)I", "GetLastIndexOf_Ljava_lang_Object_Handler")]
public virtual int LastIndexOf(Java.Lang.Object? o);
[<Android.Runtime.Register("lastIndexOf", "(Ljava/lang/Object;)I", "GetLastIndexOf_Ljava_lang_Object_Handler")>]
abstract member LastIndexOf : Java.Lang.Object -> int
override this.LastIndexOf : Java.Lang.Object -> int

Parameters

o
Object

Returns

the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element

Implements

Attributes

Remarks

Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element. More formally, returns the highest index i such that Objects.equals(o, get(i)), or -1 if there is no such index.

Java documentation for java.util.AbstractList.lastIndexOf(java.lang.Object).

Java reference for java.util.AbstractList.lastIndexOf.

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