JavaList.IndexOf Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| IndexOf(Object) |
Finds the first occurrence of an element in the Java list. |
| IndexOf(Object) |
Finds the first occurrence of an element in the Java list. |
IndexOf(Object)
Finds the first occurrence of an element in the Java list.
public virtual int IndexOf(Java.Lang.Object? item);
abstract member IndexOf : Java.Lang.Object -> int
override this.IndexOf : Java.Lang.Object -> int
Parameters
- item
- Object
The element to find.
Returns
The index of the first matching element, or -1 if it is not found.
Remarks
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
IndexOf(Object)
Finds the first occurrence of an element in the Java list.
public virtual int IndexOf(object? item);
abstract member IndexOf : obj -> int
override this.IndexOf : obj -> int
Parameters
- item
- Object
The element to find.
Returns
The index of the first matching element, or -1 if it is not found.
Implements
Remarks
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.