# IntListKt

Added in 1.4.0

*** ** * ** ***


```
public final class IntListKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/IntList` | `https://developer.android.com/reference/androidx/collection/IntListKt#buildIntList(kotlin.Function1)( @https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableIntList, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> builderAction )` Builds a new `https://developer.android.com/reference/androidx/collection/IntList` by populating a `https://developer.android.com/reference/androidx/collection/MutableIntList` using the given `https://developer.android.com/reference/androidx/collection/package-summary#buildIntList(kotlin.Function1)`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/IntList` | `https://developer.android.com/reference/androidx/collection/IntListKt#buildIntList(kotlin.Int,kotlin.Function1)( int initialCapacity, @https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableIntList, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> builderAction )` Builds a new `https://developer.android.com/reference/androidx/collection/IntList` by populating a `https://developer.android.com/reference/androidx/collection/MutableIntList` using the given `https://developer.android.com/reference/androidx/collection/package-summary#buildIntList(kotlin.Int,kotlin.Function1)`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/IntList` | `https://developer.android.com/reference/androidx/collection/IntListKt#emptyIntList()()` |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/IntList` | `https://developer.android.com/reference/androidx/collection/IntListKt#intListOf()()` |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/IntList` | `https://developer.android.com/reference/androidx/collection/IntListKt#intListOf(kotlin.Int)(int element1)` |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/IntList` | `https://developer.android.com/reference/androidx/collection/IntListKt#intListOf(kotlin.IntArray)(int... elements)` |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/IntList` | `https://developer.android.com/reference/androidx/collection/IntListKt#intListOf(kotlin.Int,kotlin.Int)(int element1, int element2)` |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/IntList` | `https://developer.android.com/reference/androidx/collection/IntListKt#intListOf(kotlin.Int,kotlin.Int,kotlin.Int)(int element1, int element2, int element3)` |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableIntList` | `https://developer.android.com/reference/androidx/collection/IntListKt#mutableIntListOf()()` |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableIntList` | `https://developer.android.com/reference/androidx/collection/IntListKt#mutableIntListOf(kotlin.Int)(int element1)` |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableIntList` | `https://developer.android.com/reference/androidx/collection/IntListKt#mutableIntListOf(kotlin.IntArray)(int... elements)` |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableIntList` | `https://developer.android.com/reference/androidx/collection/IntListKt#mutableIntListOf(kotlin.Int,kotlin.Int)(int element1, int element2)` |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableIntList` | `https://developer.android.com/reference/androidx/collection/IntListKt#mutableIntListOf(kotlin.Int,kotlin.Int,kotlin.Int)(int element1, int element2, int element3)` |

## Public methods

### buildIntList

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+function:buildIntList) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/collection#1.5.0)

```
public static final @NonNull IntList buildIntList(
    @NonNull Function1<@NonNull MutableIntList, Unit> builderAction
)
```

Builds a new `https://developer.android.com/reference/androidx/collection/IntList` by populating a `https://developer.android.com/reference/androidx/collection/MutableIntList` using the given `https://developer.android.com/reference/androidx/collection/package-summary#buildIntList(kotlin.Function1)`.

The instance passed as a receiver to the `https://developer.android.com/reference/androidx/collection/package-summary#buildIntList(kotlin.Function1)` is valid only inside that function. Using it outside of the function produces an unspecified behavior.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableIntList, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> builderAction` | Lambda in which the `https://developer.android.com/reference/androidx/collection/MutableIntList` can be populated. |

### buildIntList

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+function:buildIntList) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/collection#1.5.0)

```
public static final @NonNull IntList buildIntList(
    int initialCapacity,
    @NonNull Function1<@NonNull MutableIntList, Unit> builderAction
)
```

Builds a new `https://developer.android.com/reference/androidx/collection/IntList` by populating a `https://developer.android.com/reference/androidx/collection/MutableIntList` using the given `https://developer.android.com/reference/androidx/collection/package-summary#buildIntList(kotlin.Int,kotlin.Function1)`.

The instance passed as a receiver to the `https://developer.android.com/reference/androidx/collection/package-summary#buildIntList(kotlin.Int,kotlin.Function1)` is valid only inside that function. Using it outside of the function produces an unspecified behavior.

| Parameters |
|---|---|
| `int initialCapacity` | Hint for the expected number of elements added in the `https://developer.android.com/reference/androidx/collection/package-summary#buildIntList(kotlin.Int,kotlin.Function1)`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableIntList, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> builderAction` | Lambda in which the `https://developer.android.com/reference/androidx/collection/MutableIntList` can be populated. |

### emptyIntList

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+function:emptyIntList) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public static final @NonNull IntList emptyIntList()
```

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/IntList` | a read-only `https://developer.android.com/reference/androidx/collection/IntList` with nothing in it. |

### intListOf

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+function:intListOf) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public static final @NonNull IntList intListOf()
```

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/IntList` | a read-only `https://developer.android.com/reference/androidx/collection/IntList` with nothing in it. |

### intListOf

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+function:intListOf) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public static final @NonNull IntList intListOf(int element1)
```

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/IntList` | a new read-only `https://developer.android.com/reference/androidx/collection/IntList` with `https://developer.android.com/reference/androidx/collection/package-summary#intListOf(kotlin.Int)` as the only item in the list. |

### intListOf

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+function:intListOf) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public static final @NonNull IntList intListOf(int... elements)
```

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/IntList` | a new read-only `https://developer.android.com/reference/androidx/collection/IntList` with `https://developer.android.com/reference/androidx/collection/package-summary#intListOf(kotlin.IntArray)` in order. |

### intListOf

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+function:intListOf) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public static final @NonNull IntList intListOf(int element1, int element2)
```

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/IntList` | a new read-only `https://developer.android.com/reference/androidx/collection/IntList` with 2 elements, `https://developer.android.com/reference/androidx/collection/package-summary#intListOf(kotlin.Int,kotlin.Int)` and `https://developer.android.com/reference/androidx/collection/package-summary#intListOf(kotlin.Int,kotlin.Int)`, in order. |

### intListOf

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+function:intListOf) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public static final @NonNull IntList intListOf(int element1, int element2, int element3)
```

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/IntList` | a new read-only `https://developer.android.com/reference/androidx/collection/IntList` with 3 elements, `https://developer.android.com/reference/androidx/collection/package-summary#intListOf(kotlin.Int,kotlin.Int,kotlin.Int)`, `https://developer.android.com/reference/androidx/collection/package-summary#intListOf(kotlin.Int,kotlin.Int,kotlin.Int)`, and `https://developer.android.com/reference/androidx/collection/package-summary#intListOf(kotlin.Int,kotlin.Int,kotlin.Int)`, in order. |

### mutableIntListOf

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+function:mutableIntListOf) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public static final @NonNull MutableIntList mutableIntListOf()
```

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableIntList` | a new empty `https://developer.android.com/reference/androidx/collection/MutableIntList` with the default capacity. |

### mutableIntListOf

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+function:mutableIntListOf) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public static final @NonNull MutableIntList mutableIntListOf(int element1)
```

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableIntList` | a new `https://developer.android.com/reference/androidx/collection/MutableIntList` with `https://developer.android.com/reference/androidx/collection/package-summary#mutableIntListOf(kotlin.Int)` as the only item in the list. |

### mutableIntListOf

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+function:mutableIntListOf) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public static final @NonNull MutableIntList mutableIntListOf(int... elements)
```

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableIntList` | a new `https://developer.android.com/reference/androidx/collection/MutableIntList` with the given elements, in order. |

### mutableIntListOf

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+function:mutableIntListOf) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public static final @NonNull MutableIntList mutableIntListOf(int element1, int element2)
```

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableIntList` | a new `https://developer.android.com/reference/androidx/collection/MutableIntList` with 2 elements, `https://developer.android.com/reference/androidx/collection/package-summary#mutableIntListOf(kotlin.Int,kotlin.Int)` and `https://developer.android.com/reference/androidx/collection/package-summary#mutableIntListOf(kotlin.Int,kotlin.Int)`, in order. |

### mutableIntListOf

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+function:mutableIntListOf) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
public static final @NonNull MutableIntList mutableIntListOf(int element1, int element2, int element3)
```

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableIntList` | a new `https://developer.android.com/reference/androidx/collection/MutableIntList` with 3 elements, `https://developer.android.com/reference/androidx/collection/package-summary#mutableIntListOf(kotlin.Int,kotlin.Int,kotlin.Int)`, `https://developer.android.com/reference/androidx/collection/package-summary#mutableIntListOf(kotlin.Int,kotlin.Int,kotlin.Int)`, and `https://developer.android.com/reference/androidx/collection/package-summary#mutableIntListOf(kotlin.Int,kotlin.Int,kotlin.Int)`, in order. |