# ScatterSetKt

Added in 1.4.0

*** ** * ** ***


```
public final class ScatterSetKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/ScatterSet<@https://developer.android.com/reference/androidx/annotation/NonNull E>` | `<E extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/collection/ScatterSetKt#emptyScatterSet()()` Returns an empty, read-only `https://developer.android.com/reference/androidx/collection/ScatterSet`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableScatterSet<@https://developer.android.com/reference/androidx/annotation/NonNull E>` | `<E extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/collection/ScatterSetKt#mutableScatterSetOf()()` Returns a new `https://developer.android.com/reference/androidx/collection/MutableScatterSet`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableScatterSet<@https://developer.android.com/reference/androidx/annotation/NonNull E>` | `<E extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/collection/ScatterSetKt#mutableScatterSetOf(kotlin.Any)(@https://developer.android.com/reference/androidx/annotation/NonNull E element1)` Returns a new `https://developer.android.com/reference/androidx/collection/MutableScatterSet` with only `https://developer.android.com/reference/androidx/collection/package-summary#mutableScatterSetOf(kotlin.Any)` in it. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableScatterSet<@https://developer.android.com/reference/androidx/annotation/NonNull E>` | `<E extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/collection/ScatterSetKt#mutableScatterSetOf(kotlin.Array)(@https://developer.android.com/reference/androidx/annotation/NonNull E... elements)` Returns a new `https://developer.android.com/reference/androidx/collection/MutableScatterSet` with the specified contents. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableScatterSet<@https://developer.android.com/reference/androidx/annotation/NonNull E>` | `<E extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/collection/ScatterSetKt#mutableScatterSetOf(kotlin.Any,kotlin.Any)(@https://developer.android.com/reference/androidx/annotation/NonNull E element1, @https://developer.android.com/reference/androidx/annotation/NonNull E element2)` Returns a new `https://developer.android.com/reference/androidx/collection/MutableScatterSet` with only `https://developer.android.com/reference/androidx/collection/package-summary#mutableScatterSetOf(kotlin.Any,kotlin.Any)` and `https://developer.android.com/reference/androidx/collection/package-summary#mutableScatterSetOf(kotlin.Any,kotlin.Any)` in it. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableScatterSet<@https://developer.android.com/reference/androidx/annotation/NonNull E>` | `<E extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/collection/ScatterSetKt#mutableScatterSetOf(kotlin.Any,kotlin.Any,kotlin.Any)( @https://developer.android.com/reference/androidx/annotation/NonNull E element1, @https://developer.android.com/reference/androidx/annotation/NonNull E element2, @https://developer.android.com/reference/androidx/annotation/NonNull E element3 )` Returns a new `https://developer.android.com/reference/androidx/collection/MutableScatterSet` with only `https://developer.android.com/reference/androidx/collection/package-summary#mutableScatterSetOf(kotlin.Any,kotlin.Any,kotlin.Any)`, `https://developer.android.com/reference/androidx/collection/package-summary#mutableScatterSetOf(kotlin.Any,kotlin.Any,kotlin.Any)`, and `https://developer.android.com/reference/androidx/collection/package-summary#mutableScatterSetOf(kotlin.Any,kotlin.Any,kotlin.Any)` in it. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/ScatterSet<@https://developer.android.com/reference/androidx/annotation/NonNull E>` | `<E extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/collection/ScatterSetKt#scatterSetOf()()` Returns an empty, read-only `https://developer.android.com/reference/androidx/collection/ScatterSet`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/ScatterSet<@https://developer.android.com/reference/androidx/annotation/NonNull E>` | `<E extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/collection/ScatterSetKt#scatterSetOf(kotlin.Any)(@https://developer.android.com/reference/androidx/annotation/NonNull E element1)` Returns a new read-only `https://developer.android.com/reference/androidx/collection/ScatterSet` with only `https://developer.android.com/reference/androidx/collection/package-summary#scatterSetOf(kotlin.Any)` in it. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/ScatterSet<@https://developer.android.com/reference/androidx/annotation/NonNull E>` | `<E extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/collection/ScatterSetKt#scatterSetOf(kotlin.Array)(@https://developer.android.com/reference/androidx/annotation/NonNull E... elements)` Returns a new read-only `https://developer.android.com/reference/androidx/collection/ScatterSet` with only `https://developer.android.com/reference/androidx/collection/package-summary#scatterSetOf(kotlin.Array)` in it. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/ScatterSet<@https://developer.android.com/reference/androidx/annotation/NonNull E>` | `<E extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/collection/ScatterSetKt#scatterSetOf(kotlin.Any,kotlin.Any)(@https://developer.android.com/reference/androidx/annotation/NonNull E element1, @https://developer.android.com/reference/androidx/annotation/NonNull E element2)` Returns a new read-only `https://developer.android.com/reference/androidx/collection/ScatterSet` with only `https://developer.android.com/reference/androidx/collection/package-summary#scatterSetOf(kotlin.Any,kotlin.Any)` and `https://developer.android.com/reference/androidx/collection/package-summary#scatterSetOf(kotlin.Any,kotlin.Any)` in it. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/ScatterSet<@https://developer.android.com/reference/androidx/annotation/NonNull E>` | `<E extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/collection/ScatterSetKt#scatterSetOf(kotlin.Any,kotlin.Any,kotlin.Any)( @https://developer.android.com/reference/androidx/annotation/NonNull E element1, @https://developer.android.com/reference/androidx/annotation/NonNull E element2, @https://developer.android.com/reference/androidx/annotation/NonNull E element3 )` Returns a new read-only `https://developer.android.com/reference/androidx/collection/ScatterSet` with only `https://developer.android.com/reference/androidx/collection/package-summary#scatterSetOf(kotlin.Any,kotlin.Any,kotlin.Any)`, `https://developer.android.com/reference/androidx/collection/package-summary#scatterSetOf(kotlin.Any,kotlin.Any,kotlin.Any)`, and `https://developer.android.com/reference/androidx/collection/package-summary#scatterSetOf(kotlin.Any,kotlin.Any,kotlin.Any)` in it. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableScatterSet<@https://developer.android.com/reference/androidx/annotation/NonNull E>` | `<E extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/collection/ScatterSetKt#(kotlin.collections.Collection).toMutableScatterSet()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Collection.html<@https://developer.android.com/reference/androidx/annotation/NonNull E> receiver)` Returns a new `https://developer.android.com/reference/androidx/collection/MutableScatterSet` with the specified contents. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/MutableScatterSet<@https://developer.android.com/reference/androidx/annotation/NonNull E>` | `<E extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/collection/ScatterSetKt#(androidx.collection.ScatterSet).toMutableScatterSet()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/ScatterSet<@https://developer.android.com/reference/androidx/annotation/NonNull E> receiver)` Returns a new `https://developer.android.com/reference/androidx/collection/MutableScatterSet` with the specified contents. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/ScatterSet<@https://developer.android.com/reference/androidx/annotation/NonNull E>` | `<E extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/collection/ScatterSetKt#(kotlin.collections.Collection).toScatterSet()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Collection.html<@https://developer.android.com/reference/androidx/annotation/NonNull E> receiver)` Returns a new read-only `https://developer.android.com/reference/androidx/collection/ScatterSet` with the specified contents. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/ScatterSet<@https://developer.android.com/reference/androidx/annotation/NonNull E>` | `<E extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/collection/ScatterSetKt#(androidx.collection.ScatterSet).toScatterSet()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/ScatterSet<@https://developer.android.com/reference/androidx/annotation/NonNull E> receiver)` Returns a new read-only `https://developer.android.com/reference/androidx/collection/ScatterSet` with the specified contents. |

## Public methods

### emptyScatterSet

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

```
public static final @NonNull ScatterSet<@NonNull E> <E extends Object> emptyScatterSet()
```

Returns an empty, read-only `https://developer.android.com/reference/androidx/collection/ScatterSet`.

### mutableScatterSetOf

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

```
public static final @NonNull MutableScatterSet<@NonNull E> <E extends Object> mutableScatterSetOf()
```

Returns a new `https://developer.android.com/reference/androidx/collection/MutableScatterSet`.

### mutableScatterSetOf

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

```
public static final @NonNull MutableScatterSet<@NonNull E> <E extends Object> mutableScatterSetOf(@NonNull E element1)
```

Returns a new `https://developer.android.com/reference/androidx/collection/MutableScatterSet` with only `https://developer.android.com/reference/androidx/collection/package-summary#mutableScatterSetOf(kotlin.Any)` in it.

### mutableScatterSetOf

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

```
public static final @NonNull MutableScatterSet<@NonNull E> <E extends Object> mutableScatterSetOf(@NonNull E... elements)
```

Returns a new `https://developer.android.com/reference/androidx/collection/MutableScatterSet` with the specified contents.

### mutableScatterSetOf

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

```
public static final @NonNull MutableScatterSet<@NonNull E> <E extends Object> mutableScatterSetOf(@NonNull E element1, @NonNull E element2)
```

Returns a new `https://developer.android.com/reference/androidx/collection/MutableScatterSet` with only `https://developer.android.com/reference/androidx/collection/package-summary#mutableScatterSetOf(kotlin.Any,kotlin.Any)` and `https://developer.android.com/reference/androidx/collection/package-summary#mutableScatterSetOf(kotlin.Any,kotlin.Any)` in it.

### mutableScatterSetOf

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

```
public static final @NonNull MutableScatterSet<@NonNull E> <E extends Object> mutableScatterSetOf(
    @NonNull E element1,
    @NonNull E element2,
    @NonNull E element3
)
```

Returns a new `https://developer.android.com/reference/androidx/collection/MutableScatterSet` with only `https://developer.android.com/reference/androidx/collection/package-summary#mutableScatterSetOf(kotlin.Any,kotlin.Any,kotlin.Any)`, `https://developer.android.com/reference/androidx/collection/package-summary#mutableScatterSetOf(kotlin.Any,kotlin.Any,kotlin.Any)`, and `https://developer.android.com/reference/androidx/collection/package-summary#mutableScatterSetOf(kotlin.Any,kotlin.Any,kotlin.Any)` in it.

### scatterSetOf

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

```
public static final @NonNull ScatterSet<@NonNull E> <E extends Object> scatterSetOf()
```

Returns an empty, read-only `https://developer.android.com/reference/androidx/collection/ScatterSet`.

### scatterSetOf

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

```
public static final @NonNull ScatterSet<@NonNull E> <E extends Object> scatterSetOf(@NonNull E element1)
```

Returns a new read-only `https://developer.android.com/reference/androidx/collection/ScatterSet` with only `https://developer.android.com/reference/androidx/collection/package-summary#scatterSetOf(kotlin.Any)` in it.

### scatterSetOf

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

```
public static final @NonNull ScatterSet<@NonNull E> <E extends Object> scatterSetOf(@NonNull E... elements)
```

Returns a new read-only `https://developer.android.com/reference/androidx/collection/ScatterSet` with only `https://developer.android.com/reference/androidx/collection/package-summary#scatterSetOf(kotlin.Array)` in it.

### scatterSetOf

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

```
public static final @NonNull ScatterSet<@NonNull E> <E extends Object> scatterSetOf(@NonNull E element1, @NonNull E element2)
```

Returns a new read-only `https://developer.android.com/reference/androidx/collection/ScatterSet` with only `https://developer.android.com/reference/androidx/collection/package-summary#scatterSetOf(kotlin.Any,kotlin.Any)` and `https://developer.android.com/reference/androidx/collection/package-summary#scatterSetOf(kotlin.Any,kotlin.Any)` in it.

### scatterSetOf

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

```
public static final @NonNull ScatterSet<@NonNull E> <E extends Object> scatterSetOf(
    @NonNull E element1,
    @NonNull E element2,
    @NonNull E element3
)
```

Returns a new read-only `https://developer.android.com/reference/androidx/collection/ScatterSet` with only `https://developer.android.com/reference/androidx/collection/package-summary#scatterSetOf(kotlin.Any,kotlin.Any,kotlin.Any)`, `https://developer.android.com/reference/androidx/collection/package-summary#scatterSetOf(kotlin.Any,kotlin.Any,kotlin.Any)`, and `https://developer.android.com/reference/androidx/collection/package-summary#scatterSetOf(kotlin.Any,kotlin.Any,kotlin.Any)` in it.

### toMutableScatterSet

Artifact: [androidx.collection:collection](https://developer.android.com/jetpack/androidx/releases/collection) [View Source](https://cs.android.com/search?q=file:androidx/collection/ScatterSet.kt+function:toMutableScatterSet)

```
public static final @NonNull MutableScatterSet<@NonNull E> <E extends Object> toMutableScatterSet(@NonNull Collection<@NonNull E> receiver)
```

Returns a new `https://developer.android.com/reference/androidx/collection/MutableScatterSet` with the specified contents.

The `https://developer.android.com/reference/androidx/collection/MutableScatterSet` is created with an initial capacity sufficient to hold the content in the specified `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html`.

### toMutableScatterSet

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

```
public static final @NonNull MutableScatterSet<@NonNull E> <E extends Object> toMutableScatterSet(@NonNull ScatterSet<@NonNull E> receiver)
```

Returns a new `https://developer.android.com/reference/androidx/collection/MutableScatterSet` with the specified contents.

The `https://developer.android.com/reference/androidx/collection/MutableScatterSet` is created with an initial capacity sufficient to hold the content in the specified `https://developer.android.com/reference/androidx/collection/ScatterSet`.

### toScatterSet

Artifact: [androidx.collection:collection](https://developer.android.com/jetpack/androidx/releases/collection) [View Source](https://cs.android.com/search?q=file:androidx/collection/ScatterSet.kt+function:toScatterSet)

```
public static final @NonNull ScatterSet<@NonNull E> <E extends Object> toScatterSet(@NonNull Collection<@NonNull E> receiver)
```

Returns a new read-only `https://developer.android.com/reference/androidx/collection/ScatterSet` with the specified contents.

### toScatterSet

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

```
public static final @NonNull ScatterSet<@NonNull E> <E extends Object> toScatterSet(@NonNull ScatterSet<@NonNull E> receiver)
```

Returns a new read-only `https://developer.android.com/reference/androidx/collection/ScatterSet` with the specified contents.