SlotReader

class SlotReader : SlotEditor
kotlin.Any
   ↳ androidx.compose.SlotEditor
   ↳ androidx.compose.SlotReader

Summary

Public methods

Unit

Begin reporting empty for all calls to next() or get().

Unit

Unit

End reporting empty for calls to net() and get().

Int

End the current group.

Int

End a node

MutableList<KeyInfo>

Extract the keys from this point to the end of the group.

Any?
get()

Get the value at the current slot

Any
groupKey(index: Int)

Return the group key at index.

Any?

Get the value of the next slot.

Unit

Backup one slot.

Unit

Int

Skip the to the end of the group.

Int

Skip a group.

Int

Skip a node

Unit

Start a group.

Unit
startNode(key: Any)

Start a node.

String

Inherited functions

Properties

Any

Return the key for the current group or EMPTY

Boolean

Boolean

Return true if the current location is at the end of a group

Inherited properties

Public methods

beginEmpty

fun beginEmpty(): Unit

Begin reporting empty for all calls to next() or get(). beginEmpty() can be nested and must be called with a balanced number of endEmpty()

close

fun close(): Unit

endEmpty

fun endEmpty(): Unit

End reporting empty for calls to net() and get().

endGroup

fun endGroup(): Int

End the current group. Must be called after the corresponding startGroup().

endNode

fun endNode(): Int

End a node

extractKeys

fun extractKeys(): MutableList<KeyInfo>

Extract the keys from this point to the end of the group. The current is left unaffected. Must be called inside a group.

get

fun get(): Any?

Get the value at the current slot

groupKey

fun groupKey(index: Int): Any

Return the group key at index. isGroup(index) must be true or this will throw.

next

fun next(): Any?

Get the value of the next slot. During empty mode this value is always EMPTY which is the value a newly inserted slot.

previous

fun previous(): Unit

Backup one slot. For example, we ran into a key of a keyed group we don't want, this backs up current to be before the key.

reportUncertainNodeCount

fun reportUncertainNodeCount(): Unit

skipEnclosingGroup

fun skipEnclosingGroup(): Int

Skip the to the end of the group.

skipGroup

fun skipGroup(): Int

Skip a group. Must be called at the start of a group.

skipNode

fun skipNode(): Int

Skip a node

startGroup

fun startGroup(key: Any): Unit

Start a group. Passing an EMPTY as the key will enter the group without validating the key.

startNode

fun startNode(key: Any): Unit

Start a node.

toString

fun toString(): String

Properties

groupKey

val groupKey: Any

Return the key for the current group or EMPTY

inEmpty

val inEmpty: Boolean

isGroupEnd

val isGroupEnd: Boolean

Return true if the current location is at the end of a group