🌈 Create new beautiful Compose Gradients with our new wesite ->
Class

SnapshotStateSet

Source set: Android
public class SnapshotStateSet<T> : Parcelable, StateObject, MutableSet<T>, RandomAccess

Properties

firstStateRecord

Source set: Android
actual override var firstStateRecord: StateRecord = stateRecordWith(persistentSetOf())

size

Source set: Android
actual override val size: Int

Functions

toSet

Source set: Android
public fun toSet(): Set<T>

Return a set containing all the elements of this set.

The set returned is immutable and returned will not change even if the content of the set is changed in the same snapshot. It also will be the same instance until the content is changed. It is not, however, guaranteed to be the same instance for the same set as adding and removing the same item from the this set might produce a different instance with the same content.

This operation is O(1) and does not involve a physically copying the set. It instead returns the underlying immutable set used internally to store the content of the set.

It is recommended to use toSet when returning the value of this set from androidx.compose.runtime.snapshotFlow.

toString

Source set: Android
override fun toString(): String

writeToParcel

Source set: Android
override fun writeToParcel(parcel: Parcel, flags: Int)

describeContents

Source set: Android
override fun describeContents(): Int
Source set: Common
public class SnapshotStateSet<T> : StateObject, MutableSet<T>, RandomAccess

An implementation of MutableSet that can be observed and snapshot. This is the result type created by androidx.compose.runtime.mutableStateSetOf.

The returned set iteration order is in the order the items were inserted into the set.

Properties

firstStateRecord

Source set: Common
override var firstStateRecord: StateRecord

size

Source set: Common
override val size: Int

Functions

prependStateRecord

Source set: Common
override fun prependStateRecord(value: StateRecord)

toSet

Source set: Common
public fun toSet(): Set<T>

Return a set containing all the elements of this set.

The set returned is immutable and returned will not change even if the content of the set is changed in the same snapshot. It also will be the same instance until the content is changed. It is not, however, guaranteed to be the same instance for the same set as adding and removing the same item from the this set might produce a different instance with the same content.

This operation is O(1) and does not involve a physically copying the set. It instead returns the underlying immutable set used internally to store the content of the set.

It is recommended to use toSet when returning the value of this set from androidx.compose.runtime.snapshotFlow.

contains

Source set: Common
override fun contains(element: T): Boolean

containsAll

Source set: Common
override fun containsAll(elements: Collection<T>): Boolean

isEmpty

Source set: Common
override fun isEmpty(): Boolean

iterator

Source set: Common
override fun iterator(): MutableIterator<T>

add

Source set: Common
override fun add(element: T): Boolean

addAll

Source set: Common
override fun addAll(elements: Collection<T>): Boolean

clear

Source set: Common
override fun clear()

remove

Source set: Common
override fun remove(element: T): Boolean

removeAll

Source set: Common
override fun removeAll(elements: Collection<T>): Boolean

retainAll

Source set: Common
override fun retainAll(elements: Collection<T>): Boolean
Source set: NonAndroid
public class SnapshotStateSet<T> : StateObject, MutableSet<T>, RandomAccess

Properties

firstStateRecord

Source set: NonAndroid
actual override var firstStateRecord: StateRecord = stateRecordWith(persistentSetOf())

size

Source set: NonAndroid
actual override val size: Int

Functions

toSet

Source set: NonAndroid
public fun toSet(): Set<T>

Return a set containing all the elements of this set.

The set returned is immutable and returned will not change even if the content of the set is changed in the same snapshot. It also will be the same instance until the content is changed. It is not, however, guaranteed to be the same instance for the same set as adding and removing the same item from the this set might produce a different instance with the same content.

This operation is O(1) and does not involve a physically copying the set. It instead returns the underlying immutable set used internally to store the content of the set.

It is recommended to use toSet when returning the value of this set from androidx.compose.runtime.snapshotFlow.

toString

Source set: NonAndroid
override fun toString(): String