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 |
close() |
Unit |
endEmpty() End reporting empty for calls to net() and get(). |
Int |
endGroup() End the current group. |
Int |
endNode() 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 |
Return the group key at index. |
Any? |
next() Get the value of the next slot. |
Unit |
previous() Backup one slot. |
Unit | |
Int |
Skip the to the end of the group. |
Int |
Skip a group. |
Int |
skipNode() Skip a node |
Unit |
startGroup(key: Any) Start a group. |
Unit |
Start a node. |
String |
toString() |
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
endGroup
fun endGroup(): Int
End the current group. Must be called after the corresponding startGroup().
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.
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
startGroup
fun startGroup(key: Any): Unit
Start a group. Passing an EMPTY as the key will enter the group without validating the key.
toString
fun toString(): String
Properties
inEmpty
val inEmpty: Boolean