# IntList

Artifact: [androidx.collection:collection](https://developer.android.com/jetpack/androidx/releases/collection) [View Source](https://cs.android.com/search?q=file:androidx/collection/IntList.kt+class:androidx.collection.IntList) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

*** ** * ** ***


```
public sealed class IntList
```

<br />

Known direct subclasses [MutableIntList](https://developer.android.com/reference/androidx/collection/MutableIntList)

|---|---|
| `https://developer.android.com/reference/androidx/collection/MutableIntList` | `https://developer.android.com/reference/androidx/collection/MutableIntList` is a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html`-like collection for `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` values. |

*** ** * ** ***

`https://developer.android.com/reference/androidx/collection/IntList` is a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html`-like collection for `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` values. It allows retrieving the elements without boxing. `https://developer.android.com/reference/androidx/collection/IntList` is always backed by a `https://developer.android.com/reference/androidx/collection/MutableIntList`, its `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html`-like subclass. The purpose of this class is to avoid the performance overhead of auto-boxing due to generics since `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html` classes all operate on objects.

This implementation is not thread-safe: if multiple threads access this container concurrently, and one or more threads modify the structure of the list (insertion or removal for instance), the calling code must provide the appropriate synchronization. It is also not safe to mutate during reentrancy -- in the middle of a `https://developer.android.com/reference/androidx/collection/IntList#forEach(kotlin.Function1)`, for example. However, concurrent reads are safe.

## Summary

| ### Protected constructors |
|---|
| `https://developer.android.com/reference/androidx/collection/IntList#IntList(kotlin.Int)(int initialCapacity)` |

| ### Public methods |
|---|---|
| `final boolean` | `https://developer.android.com/reference/androidx/collection/IntList#any()()` Returns `true` if there's at least one element in the collection. |
| `final boolean` | `https://developer.android.com/reference/androidx/collection/IntList#any(kotlin.Function1)(@https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Boolean.html> predicate)` Returns `true` if any of the elements give a `true` return value for `https://developer.android.com/reference/androidx/collection/IntList#any(kotlin.Function1)`. |
| `final int` | `https://developer.android.com/reference/androidx/collection/IntList#binarySearch(kotlin.Int,kotlin.Int,kotlin.Int)( int element, @https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) int fromIndex, @https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) int toIndex )` Searches this list for the specified `https://developer.android.com/reference/androidx/collection/IntList#binarySearch(kotlin.Int,kotlin.Int,kotlin.Int)` in the range defined by `https://developer.android.com/reference/androidx/collection/IntList#binarySearch(kotlin.Int,kotlin.Int,kotlin.Int)` and `https://developer.android.com/reference/androidx/collection/IntList#binarySearch(kotlin.Int,kotlin.Int,kotlin.Int)`. |
| `final int` | `https://developer.android.com/reference/androidx/collection/IntList#binarySearch(kotlin.Int,kotlin.Int,kotlin.Function1)( @https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) int fromIndex, @https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) int toIndex, @https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html> comparison )` Searches this `https://developer.android.com/reference/androidx/collection/IntList` or its range for an element for which the given `https://developer.android.com/reference/androidx/collection/IntList#binarySearch(kotlin.Int,kotlin.Int,kotlin.Function1)` function returns zero using binary search algorithm. |
| `final boolean` | `https://developer.android.com/reference/androidx/collection/IntList#contains(kotlin.Int)(int element)` Returns `true` if the `https://developer.android.com/reference/androidx/collection/IntList` contains `https://developer.android.com/reference/androidx/collection/IntList#contains(kotlin.Int)` or `false` otherwise. |
| `final boolean` | `https://developer.android.com/reference/androidx/collection/IntList#containsAll(androidx.collection.IntList)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/IntList elements)` Returns `true` if the `https://developer.android.com/reference/androidx/collection/IntList` contains all elements in `https://developer.android.com/reference/androidx/collection/IntList#containsAll(androidx.collection.IntList)` or `false` if one or more are missing. |
| `final int` | `https://developer.android.com/reference/androidx/collection/IntList#count()()` Returns the number of elements in this list. |
| `final int` | `https://developer.android.com/reference/androidx/collection/IntList#count(kotlin.Function1)(@https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Boolean.html> predicate)` Counts the number of elements matching `https://developer.android.com/reference/androidx/collection/IntList#count(kotlin.Function1)`. |
| `final int` | `https://developer.android.com/reference/androidx/collection/IntList#elementAt(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) int index)` Returns the element at the given `https://developer.android.com/reference/androidx/collection/IntList#elementAt(kotlin.Int)` or throws `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-index-out-of-bounds-exception/index.html` if the `https://developer.android.com/reference/androidx/collection/IntList#elementAt(kotlin.Int)` is out of bounds of this collection. |
| `final int` | `https://developer.android.com/reference/androidx/collection/IntList#elementAtOrElse(kotlin.Int,kotlin.Function1)( @https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) int index, @https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html> defaultValue )` Returns the element at the given `https://developer.android.com/reference/androidx/collection/IntList#elementAtOrElse(kotlin.Int,kotlin.Function1)` or `https://developer.android.com/reference/androidx/collection/IntList#elementAtOrElse(kotlin.Int,kotlin.Function1)` if `https://developer.android.com/reference/androidx/collection/IntList#elementAtOrElse(kotlin.Int,kotlin.Function1)` is out of bounds of the collection. |
| `boolean` | `https://developer.android.com/reference/androidx/collection/IntList#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` Returns `true` if `https://developer.android.com/reference/androidx/collection/IntList#equals(kotlin.Any)` is a `https://developer.android.com/reference/androidx/collection/IntList` and the contents of this and `https://developer.android.com/reference/androidx/collection/IntList#equals(kotlin.Any)` are the same. |
| `final int` | `https://developer.android.com/reference/androidx/collection/IntList#first()()` Returns the first element in the `https://developer.android.com/reference/androidx/collection/IntList` or throws a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-no-such-element-exception/index.html` if it `https://developer.android.com/reference/androidx/collection/IntList#isEmpty()`. |
| `final int` | `https://developer.android.com/reference/androidx/collection/IntList#first(kotlin.Function1)(@https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Boolean.html> predicate)` Returns the first element in the `https://developer.android.com/reference/androidx/collection/IntList` for which `https://developer.android.com/reference/androidx/collection/IntList#first(kotlin.Function1)` returns `true` or throws `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-no-such-element-exception/index.html` if nothing matches. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull R` | `<R extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/collection/IntList#fold(kotlin.Any,kotlin.Function2)( @https://developer.android.com/reference/androidx/annotation/NonNull R initial, @https://developer.android.com/reference/androidx/annotation/NonNull Function2<@https://developer.android.com/reference/androidx/annotation/NonNull acc, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull R> operation )` Accumulates values, starting with `https://developer.android.com/reference/androidx/collection/IntList#fold(kotlin.Any,kotlin.Function2)`, and applying `https://developer.android.com/reference/androidx/collection/IntList#fold(kotlin.Any,kotlin.Function2)` to each element in the `https://developer.android.com/reference/androidx/collection/IntList` in order. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull R` | `<R extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/collection/IntList#foldIndexed(kotlin.Any,kotlin.Function3)( @https://developer.android.com/reference/androidx/annotation/NonNull R initial, @https://developer.android.com/reference/androidx/annotation/NonNull Function3<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull acc, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull R> operation )` Accumulates values, starting with `https://developer.android.com/reference/androidx/collection/IntList#foldIndexed(kotlin.Any,kotlin.Function3)`, and applying `https://developer.android.com/reference/androidx/collection/IntList#foldIndexed(kotlin.Any,kotlin.Function3)` to each element in the `https://developer.android.com/reference/androidx/collection/IntList` in order. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull R` | `<R extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/collection/IntList#foldRight(kotlin.Any,kotlin.Function2)( @https://developer.android.com/reference/androidx/annotation/NonNull R initial, @https://developer.android.com/reference/androidx/annotation/NonNull Function2<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull acc, @https://developer.android.com/reference/androidx/annotation/NonNull R> operation )` Accumulates values, starting with `https://developer.android.com/reference/androidx/collection/IntList#foldRight(kotlin.Any,kotlin.Function2)`, and applying `https://developer.android.com/reference/androidx/collection/IntList#foldRight(kotlin.Any,kotlin.Function2)` to each element in the `https://developer.android.com/reference/androidx/collection/IntList` in reverse order. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull R` | `<R extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/collection/IntList#foldRightIndexed(kotlin.Any,kotlin.Function3)( @https://developer.android.com/reference/androidx/annotation/NonNull R initial, @https://developer.android.com/reference/androidx/annotation/NonNull Function3<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull acc, @https://developer.android.com/reference/androidx/annotation/NonNull R> operation )` Accumulates values, starting with `https://developer.android.com/reference/androidx/collection/IntList#foldRightIndexed(kotlin.Any,kotlin.Function3)`, and applying `https://developer.android.com/reference/androidx/collection/IntList#foldRightIndexed(kotlin.Any,kotlin.Function3)` to each element in the `https://developer.android.com/reference/androidx/collection/IntList` in reverse order. |
| `final void` | `https://developer.android.com/reference/androidx/collection/IntList#forEach(kotlin.Function1)(@https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> block)` Calls `https://developer.android.com/reference/androidx/collection/IntList#forEach(kotlin.Function1)` for each element in the `https://developer.android.com/reference/androidx/collection/IntList`, in order. |
| `final void` | `https://developer.android.com/reference/androidx/collection/IntList#forEachIndexed(kotlin.Function2)( @https://developer.android.com/reference/androidx/annotation/NonNull Function2<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> block )` Calls `https://developer.android.com/reference/androidx/collection/IntList#forEachIndexed(kotlin.Function2)` for each element in the `https://developer.android.com/reference/androidx/collection/IntList` along with its index, in order. |
| `final void` | `https://developer.android.com/reference/androidx/collection/IntList#forEachReversed(kotlin.Function1)(@https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> block)` Calls `https://developer.android.com/reference/androidx/collection/IntList#forEachReversed(kotlin.Function1)` for each element in the `https://developer.android.com/reference/androidx/collection/IntList` in reverse order. |
| `final void` | `https://developer.android.com/reference/androidx/collection/IntList#forEachReversedIndexed(kotlin.Function2)( @https://developer.android.com/reference/androidx/annotation/NonNull Function2<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> block )` Calls `https://developer.android.com/reference/androidx/collection/IntList#forEachReversedIndexed(kotlin.Function2)` for each element in the `https://developer.android.com/reference/androidx/collection/IntList` along with its index, in reverse order. |
| `final int` | `https://developer.android.com/reference/androidx/collection/IntList#get(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) int index)` Returns the element at the given `https://developer.android.com/reference/androidx/collection/IntList#get(kotlin.Int)` or throws `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-index-out-of-bounds-exception/index.html` if the `https://developer.android.com/reference/androidx/collection/IntList#get(kotlin.Int)` is out of bounds of this collection. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.ranges/-int-range/index.html` | `https://developer.android.com/reference/androidx/collection/IntList#getIndices()()` Returns an `https://developer.android.com/reference/androidx/annotation/IntRange` of the valid indices for this `https://developer.android.com/reference/androidx/collection/IntList`. |
| `final @https://developer.android.com/reference/androidx/annotation/IntRange(from = -1) int` | `https://developer.android.com/reference/androidx/collection/IntList#getLastIndex()()` Returns the last valid index in the `https://developer.android.com/reference/androidx/collection/IntList`. |
| `final @https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) int` | `https://developer.android.com/reference/androidx/collection/IntList#getSize()()` The number of elements in the `https://developer.android.com/reference/androidx/collection/IntList`. |
| `int` | `https://developer.android.com/reference/androidx/collection/IntList#hashCode()()` Returns a hash code based on the contents of the `https://developer.android.com/reference/androidx/collection/IntList`. |
| `final int` | `https://developer.android.com/reference/androidx/collection/IntList#indexOf(kotlin.Int)(int element)` Returns the index of `https://developer.android.com/reference/androidx/collection/IntList#indexOf(kotlin.Int)` in the `https://developer.android.com/reference/androidx/collection/IntList` or `-1` if `https://developer.android.com/reference/androidx/collection/IntList#indexOf(kotlin.Int)` is not there. |
| `final int` | `https://developer.android.com/reference/androidx/collection/IntList#indexOfFirst(kotlin.Function1)( @https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Boolean.html> predicate )` Returns the index if the first element in the `https://developer.android.com/reference/androidx/collection/IntList` for which `https://developer.android.com/reference/androidx/collection/IntList#indexOfFirst(kotlin.Function1)` returns `true`. |
| `final int` | `https://developer.android.com/reference/androidx/collection/IntList#indexOfLast(kotlin.Function1)( @https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Boolean.html> predicate )` Returns the index if the last element in the `https://developer.android.com/reference/androidx/collection/IntList` for which `https://developer.android.com/reference/androidx/collection/IntList#indexOfLast(kotlin.Function1)` returns `true`. |
| `final boolean` | `https://developer.android.com/reference/androidx/collection/IntList#isEmpty()()` Returns `true` if the `https://developer.android.com/reference/androidx/collection/IntList` has no elements in it or `false` otherwise. |
| `final boolean` | `https://developer.android.com/reference/androidx/collection/IntList#isNotEmpty()()` Returns `true` if there are elements in the `https://developer.android.com/reference/androidx/collection/IntList` or `false` if it is empty. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html separator, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html prefix, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html postfix, int limit, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html truncated )` Creates a String from the elements separated by `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence)` and using `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence)` before and `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence)` after, if supplied. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function1)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html separator, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html prefix, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html postfix, int limit, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html truncated, @https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html> transform )` Creates a String from the elements separated by `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function1)` and using `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function1)` before and `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function1)` after, if supplied. |
| `final int` | `https://developer.android.com/reference/androidx/collection/IntList#last()()` Returns the last element in the `https://developer.android.com/reference/androidx/collection/IntList` or throws a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-no-such-element-exception/index.html` if it `https://developer.android.com/reference/androidx/collection/IntList#isEmpty()`. |
| `final int` | `https://developer.android.com/reference/androidx/collection/IntList#last(kotlin.Function1)(@https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Boolean.html> predicate)` Returns the last element in the `https://developer.android.com/reference/androidx/collection/IntList` for which `https://developer.android.com/reference/androidx/collection/IntList#last(kotlin.Function1)` returns `true` or throws `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-no-such-element-exception/index.html` if nothing matches. |
| `final int` | `https://developer.android.com/reference/androidx/collection/IntList#lastIndexOf(kotlin.Int)(int element)` Returns the index of the last element in the `https://developer.android.com/reference/androidx/collection/IntList` that is the same as `https://developer.android.com/reference/androidx/collection/IntList#lastIndexOf(kotlin.Int)` or `-1` if no elements match. |
| `final boolean` | `https://developer.android.com/reference/androidx/collection/IntList#none()()` Returns `true` if the collection has no elements in it. |
| `final boolean` | `https://developer.android.com/reference/androidx/collection/IntList#reversedAny(kotlin.Function1)( @https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Boolean.html> predicate )` Returns `true` if any of the elements give a `true` return value for `https://developer.android.com/reference/androidx/collection/IntList#reversedAny(kotlin.Function1)` while iterating in the reverse order. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/collection/IntList#toString()()` Returns a String representation of the list, surrounded by "\[\]" and each element separated by ", ". |

## Protected constructors

### IntList

```
protected IntList(int initialCapacity)
```

## Public methods

### any

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final boolean any()
```

Returns `true` if there's at least one element in the collection.

### any

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final boolean any(@NonNull Function1<@NonNull Integer, @NonNull Boolean> predicate)
```

Returns `true` if any of the elements give a `true` return value for `https://developer.android.com/reference/androidx/collection/IntList#any(kotlin.Function1)`.

### binarySearch

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/collection#1.5.0)

```
public final int binarySearch(
    int element,
    @IntRange(from = 0) int fromIndex,
    @IntRange(from = 0) int toIndex
)
```

Searches this list for the specified `https://developer.android.com/reference/androidx/collection/IntList#binarySearch(kotlin.Int,kotlin.Int,kotlin.Int)` in the range defined by `https://developer.android.com/reference/androidx/collection/IntList#binarySearch(kotlin.Int,kotlin.Int,kotlin.Int)` and `https://developer.android.com/reference/androidx/collection/IntList#binarySearch(kotlin.Int,kotlin.Int,kotlin.Int)`. The list is expected to be sorted into ascending order according to the natural ordering of its elements, otherwise the result is undefined.

`https://developer.android.com/reference/androidx/collection/IntList#binarySearch(kotlin.Int,kotlin.Int,kotlin.Int)` must be \>= 0 and \<`https://developer.android.com/reference/androidx/collection/IntList#binarySearch(kotlin.Int,kotlin.Int,kotlin.Int)`, and `https://developer.android.com/reference/androidx/collection/IntList#binarySearch(kotlin.Int,kotlin.Int,kotlin.Int)` must be \<= `https://developer.android.com/reference/androidx/collection/IntList#size()`, otherwise an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-index-out-of-bounds-exception/index.html` will be thrown.

| Returns |
|---|---|
| `int` | the index of the element if it is contained in the list within the specified range, otherwise, the inverted insertion point `(-insertionPoint - 1)`. The insertion point is defined as the index at which the element should be inserted, so that the list remains sorted. |

### binarySearch

Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/collection#1.7.0)

```
public final int binarySearch(
    @IntRange(from = 0) int fromIndex,
    @IntRange(from = 0) int toIndex,
    @NonNull Function1<@NonNull Integer, @NonNull Integer> comparison
)
```

Searches this `https://developer.android.com/reference/androidx/collection/IntList` or its range for an element for which the given `https://developer.android.com/reference/androidx/collection/IntList#binarySearch(kotlin.Int,kotlin.Int,kotlin.Function1)` function returns zero using binary search algorithm.

### contains

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final boolean contains(int element)
```

Returns `true` if the `https://developer.android.com/reference/androidx/collection/IntList` contains `https://developer.android.com/reference/androidx/collection/IntList#contains(kotlin.Int)` or `false` otherwise.

### containsAll

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final boolean containsAll(@NonNull IntList elements)
```

Returns `true` if the `https://developer.android.com/reference/androidx/collection/IntList` contains all elements in `https://developer.android.com/reference/androidx/collection/IntList#containsAll(androidx.collection.IntList)` or `false` if one or more are missing.

### count

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final int count()
```

Returns the number of elements in this list.

### count

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final int count(@NonNull Function1<@NonNull Integer, @NonNull Boolean> predicate)
```

Counts the number of elements matching `https://developer.android.com/reference/androidx/collection/IntList#count(kotlin.Function1)`.

| Returns |
|---|---|
| `int` | The number of elements in this list for which `https://developer.android.com/reference/androidx/collection/IntList#count(kotlin.Function1)` returns true. |

### elementAt

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final int elementAt(@IntRange(from = 0) int index)
```

Returns the element at the given `https://developer.android.com/reference/androidx/collection/IntList#elementAt(kotlin.Int)` or throws `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-index-out-of-bounds-exception/index.html` if the `https://developer.android.com/reference/androidx/collection/IntList#elementAt(kotlin.Int)` is out of bounds of this collection.

### elementAtOrElse

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final int elementAtOrElse(
    @IntRange(from = 0) int index,
    @NonNull Function1<@NonNull Integer, @NonNull Integer> defaultValue
)
```

Returns the element at the given `https://developer.android.com/reference/androidx/collection/IntList#elementAtOrElse(kotlin.Int,kotlin.Function1)` or `https://developer.android.com/reference/androidx/collection/IntList#elementAtOrElse(kotlin.Int,kotlin.Function1)` if `https://developer.android.com/reference/androidx/collection/IntList#elementAtOrElse(kotlin.Int,kotlin.Function1)` is out of bounds of the collection.

| Parameters |
|---|---|
| `index: int` | The index of the element whose value should be returned |
| `@https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html> defaultValue` | A lambda to call with `https://developer.android.com/reference/androidx/collection/IntList#elementAtOrElse(kotlin.Int,kotlin.Function1)` as a parameter to return a value at an index not in the list. |

### equals

```
public boolean equals(Object other)
```

Returns `true` if `https://developer.android.com/reference/androidx/collection/IntList#equals(kotlin.Any)` is a `https://developer.android.com/reference/androidx/collection/IntList` and the contents of this and `https://developer.android.com/reference/androidx/collection/IntList#equals(kotlin.Any)` are the same.

### first

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final int first()
```

Returns the first element in the `https://developer.android.com/reference/androidx/collection/IntList` or throws a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-no-such-element-exception/index.html` if it `https://developer.android.com/reference/androidx/collection/IntList#isEmpty()`.

### first

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final int first(@NonNull Function1<@NonNull Integer, @NonNull Boolean> predicate)
```

Returns the first element in the `https://developer.android.com/reference/androidx/collection/IntList` for which `https://developer.android.com/reference/androidx/collection/IntList#first(kotlin.Function1)` returns `true` or throws `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-no-such-element-exception/index.html` if nothing matches.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/collection/IntList#indexOfFirst(kotlin.Function1)` |   |

### fold

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final @NonNull R <R extends Object> fold(
    @NonNull R initial,
    @NonNull Function2<@NonNull acc, @NonNull Integer, @NonNull R> operation
)
```

Accumulates values, starting with `https://developer.android.com/reference/androidx/collection/IntList#fold(kotlin.Any,kotlin.Function2)`, and applying `https://developer.android.com/reference/androidx/collection/IntList#fold(kotlin.Any,kotlin.Function2)` to each element in the `https://developer.android.com/reference/androidx/collection/IntList` in order.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull R initial` | The value of `acc` for the first call to `https://developer.android.com/reference/androidx/collection/IntList#fold(kotlin.Any,kotlin.Function2)` or return value if there are no elements in this list. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull Function2<@https://developer.android.com/reference/androidx/annotation/NonNull acc, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull R> operation` | function that takes current accumulator value and an element, and calculates the next accumulator value. |

### foldIndexed

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final @NonNull R <R extends Object> foldIndexed(
    @NonNull R initial,
    @NonNull Function3<@NonNull Integer, @NonNull acc, @NonNull Integer, @NonNull R> operation
)
```

Accumulates values, starting with `https://developer.android.com/reference/androidx/collection/IntList#foldIndexed(kotlin.Any,kotlin.Function3)`, and applying `https://developer.android.com/reference/androidx/collection/IntList#foldIndexed(kotlin.Any,kotlin.Function3)` to each element in the `https://developer.android.com/reference/androidx/collection/IntList` in order.

### foldRight

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final @NonNull R <R extends Object> foldRight(
    @NonNull R initial,
    @NonNull Function2<@NonNull Integer, @NonNull acc, @NonNull R> operation
)
```

Accumulates values, starting with `https://developer.android.com/reference/androidx/collection/IntList#foldRight(kotlin.Any,kotlin.Function2)`, and applying `https://developer.android.com/reference/androidx/collection/IntList#foldRight(kotlin.Any,kotlin.Function2)` to each element in the `https://developer.android.com/reference/androidx/collection/IntList` in reverse order.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull R initial` | The value of `acc` for the first call to `https://developer.android.com/reference/androidx/collection/IntList#foldRight(kotlin.Any,kotlin.Function2)` or return value if there are no elements in this list. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull Function2<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull acc, @https://developer.android.com/reference/androidx/annotation/NonNull R> operation` | function that takes an element and the current accumulator value, and calculates the next accumulator value. |

### foldRightIndexed

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final @NonNull R <R extends Object> foldRightIndexed(
    @NonNull R initial,
    @NonNull Function3<@NonNull Integer, @NonNull Integer, @NonNull acc, @NonNull R> operation
)
```

Accumulates values, starting with `https://developer.android.com/reference/androidx/collection/IntList#foldRightIndexed(kotlin.Any,kotlin.Function3)`, and applying `https://developer.android.com/reference/androidx/collection/IntList#foldRightIndexed(kotlin.Any,kotlin.Function3)` to each element in the `https://developer.android.com/reference/androidx/collection/IntList` in reverse order.

### forEach

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final void forEach(@NonNull Function1<@NonNull Integer, Unit> block)
```

Calls `https://developer.android.com/reference/androidx/collection/IntList#forEach(kotlin.Function1)` for each element in the `https://developer.android.com/reference/androidx/collection/IntList`, in order.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> block` | will be executed for every element in the list, accepting an element from the list |

### forEachIndexed

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final void forEachIndexed(
    @NonNull Function2<@NonNull Integer, @NonNull Integer, Unit> block
)
```

Calls `https://developer.android.com/reference/androidx/collection/IntList#forEachIndexed(kotlin.Function2)` for each element in the `https://developer.android.com/reference/androidx/collection/IntList` along with its index, in order.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull Function2<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> block` | will be executed for every element in the list, accepting the index and the element at that index. |

### forEachReversed

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final void forEachReversed(@NonNull Function1<@NonNull Integer, Unit> block)
```

Calls `https://developer.android.com/reference/androidx/collection/IntList#forEachReversed(kotlin.Function1)` for each element in the `https://developer.android.com/reference/androidx/collection/IntList` in reverse order.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> block` | will be executed for every element in the list, accepting an element from the list |

### forEachReversedIndexed

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final void forEachReversedIndexed(
    @NonNull Function2<@NonNull Integer, @NonNull Integer, Unit> block
)
```

Calls `https://developer.android.com/reference/androidx/collection/IntList#forEachReversedIndexed(kotlin.Function2)` for each element in the `https://developer.android.com/reference/androidx/collection/IntList` along with its index, in reverse order.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull Function2<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> block` | will be executed for every element in the list, accepting the index and the element at that index. |

### get

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final int get(@IntRange(from = 0) int index)
```

Returns the element at the given `https://developer.android.com/reference/androidx/collection/IntList#get(kotlin.Int)` or throws `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-index-out-of-bounds-exception/index.html` if the `https://developer.android.com/reference/androidx/collection/IntList#get(kotlin.Int)` is out of bounds of this collection.

### getIndices

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final @NonNull IntRange getIndices()
```

Returns an `https://developer.android.com/reference/androidx/annotation/IntRange` of the valid indices for this `https://developer.android.com/reference/androidx/collection/IntList`.

### getLastIndex

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final @IntRange(from = -1) int getLastIndex()
```

Returns the last valid index in the `https://developer.android.com/reference/androidx/collection/IntList`. This can be `-1` when the list is empty.

### getSize

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final @IntRange(from = 0) int getSize()
```

The number of elements in the `https://developer.android.com/reference/androidx/collection/IntList`.

### hashCode

```
public int hashCode()
```

Returns a hash code based on the contents of the `https://developer.android.com/reference/androidx/collection/IntList`.

### indexOf

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final int indexOf(int element)
```

Returns the index of `https://developer.android.com/reference/androidx/collection/IntList#indexOf(kotlin.Int)` in the `https://developer.android.com/reference/androidx/collection/IntList` or `-1` if `https://developer.android.com/reference/androidx/collection/IntList#indexOf(kotlin.Int)` is not there.

### indexOfFirst

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final int indexOfFirst(
    @NonNull Function1<@NonNull Integer, @NonNull Boolean> predicate
)
```

Returns the index if the first element in the `https://developer.android.com/reference/androidx/collection/IntList` for which `https://developer.android.com/reference/androidx/collection/IntList#indexOfFirst(kotlin.Function1)` returns `true`.

### indexOfLast

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final int indexOfLast(
    @NonNull Function1<@NonNull Integer, @NonNull Boolean> predicate
)
```

Returns the index if the last element in the `https://developer.android.com/reference/androidx/collection/IntList` for which `https://developer.android.com/reference/androidx/collection/IntList#indexOfLast(kotlin.Function1)` returns `true`.

### isEmpty

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final boolean isEmpty()
```

Returns `true` if the `https://developer.android.com/reference/androidx/collection/IntList` has no elements in it or `false` otherwise.

### isNotEmpty

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final boolean isNotEmpty()
```

Returns `true` if there are elements in the `https://developer.android.com/reference/androidx/collection/IntList` or `false` if it is empty.

### joinToString

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final @NonNull String joinToString(
    @NonNull CharSequence separator,
    @NonNull CharSequence prefix,
    @NonNull CharSequence postfix,
    int limit,
    @NonNull CharSequence truncated
)
```

Creates a String from the elements separated by `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence)` and using `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence)` before and `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence)` after, if supplied.

When a non-negative value of `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence)` is provided, a maximum of `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence)` items are used to generate the string. If the collection holds more than `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence)` items, the string is terminated with `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence)`.

### joinToString

```
public final @NonNull String joinToString(
    @NonNull CharSequence separator,
    @NonNull CharSequence prefix,
    @NonNull CharSequence postfix,
    int limit,
    @NonNull CharSequence truncated,
    @NonNull Function1<@NonNull Integer, @NonNull CharSequence> transform
)
```

Creates a String from the elements separated by `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function1)` and using `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function1)` before and `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function1)` after, if supplied. `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function1)` dictates how each element will be represented.

When a non-negative value of `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function1)` is provided, a maximum of `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function1)` items are used to generate the string. If the collection holds more than `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function1)` items, the string is terminated with `https://developer.android.com/reference/androidx/collection/IntList#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function1)`.

### last

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final int last()
```

Returns the last element in the `https://developer.android.com/reference/androidx/collection/IntList` or throws a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-no-such-element-exception/index.html` if it `https://developer.android.com/reference/androidx/collection/IntList#isEmpty()`.

### last

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final int last(@NonNull Function1<@NonNull Integer, @NonNull Boolean> predicate)
```

Returns the last element in the `https://developer.android.com/reference/androidx/collection/IntList` for which `https://developer.android.com/reference/androidx/collection/IntList#last(kotlin.Function1)` returns `true` or throws `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-no-such-element-exception/index.html` if nothing matches.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/collection/IntList#indexOfLast(kotlin.Function1)` |   |

### lastIndexOf

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final int lastIndexOf(int element)
```

Returns the index of the last element in the `https://developer.android.com/reference/androidx/collection/IntList` that is the same as `https://developer.android.com/reference/androidx/collection/IntList#lastIndexOf(kotlin.Int)` or `-1` if no elements match.

### none

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final boolean none()
```

Returns `true` if the collection has no elements in it.

### reversedAny

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public final boolean reversedAny(
    @NonNull Function1<@NonNull Integer, @NonNull Boolean> predicate
)
```

Returns `true` if any of the elements give a `true` return value for `https://developer.android.com/reference/androidx/collection/IntList#reversedAny(kotlin.Function1)` while iterating in the reverse order.

### toString

```
public @NonNull String toString()
```

Returns a String representation of the list, surrounded by "\[\]" and each element separated by ", ".