6월 3일의 ⁠#Android11: 베타 버전 출시 행사에 참여하세요.

ModelList

class ModelList<T> : MutableList<T>, Framed
kotlin.Any
   ↳ androidx.compose.frames.ModelList

Summary

Public constructors

Public methods

Boolean
add(element: T)

Unit
add(index: Int, element: T)

Boolean
addAll(index: Int, elements: Collection<T>)

Boolean
addAll(elements: Collection<T>)

Unit

Boolean
contains(element: T)

Boolean
containsAll(elements: Collection<T>)

T
get(index: Int)

Int
indexOf(element: T)

Boolean

MutableIterator<T>

Int
lastIndexOf(element: T)

MutableListIterator<T>

MutableListIterator<T>
listIterator(index: Int)

Unit

Add a new state record to the beginning of a list.

Boolean
remove(element: T)

Boolean
removeAll(elements: Collection<T>)

T
removeAt(index: Int)

Boolean
retainAll(elements: Collection<T>)

T
set(index: Int, element: T)

MutableList<T>
subList(fromIndex: Int, toIndex: Int)

Inherited extension functions

From androidx.ui.core.gesture.kotlin.collections.List
Boolean

Utility method that determines if any pointers are currently in bounds.

From androidx.ui.util.kotlin.collections.List
Boolean
List<T>.fastAny(predicate: (T) -> Boolean)

Returns true if at least one element matches the given predicate.

T?
List<T>.fastFirstOrNull(predicate: (T) -> Boolean)

Returns the first value that predicate returns true for or null if nothing matches.

Unit
List<T>.fastForEach(action: (T) -> Unit)

Iterates through a List using the index and calls action for each item.

Unit
List<T>.fastForEachIndexed(action: (Int, T) -> Unit)

Iterates through a List using the index and calls action for each item.

Properties

Record

The first state record in a linked list of state records.

Int

Public constructors

<init>

ModelList()

Public methods

add

fun add(element: T): Boolean

add

fun add(
    index: Int,
    element: T
): Unit

addAll

fun addAll(
    index: Int,
    elements: Collection<T>
): Boolean

addAll

fun addAll(elements: Collection<T>): Boolean

clear

fun clear(): Unit

contains

fun contains(element: T): Boolean

containsAll

fun containsAll(elements: Collection<T>): Boolean

get

fun get(index: Int): T

indexOf

fun indexOf(element: T): Int

isEmpty

fun isEmpty(): Boolean

iterator

fun iterator(): MutableIterator<T>

lastIndexOf

fun lastIndexOf(element: T): Int

listIterator

fun listIterator(): MutableListIterator<T>

listIterator

fun listIterator(index: Int): MutableListIterator<T>

prependFrameRecord

fun prependFrameRecord(value: Record): Unit

Add a new state record to the beginning of a list. After this call firstFrameRecord should be value.

remove

fun remove(element: T): Boolean

removeAll

fun removeAll(elements: Collection<T>): Boolean

removeAt

fun removeAt(index: Int): T

retainAll

fun retainAll(elements: Collection<T>): Boolean

set

fun set(
    index: Int,
    element: T
): T

subList

fun subList(
    fromIndex: Int,
    toIndex: Int
): MutableList<T>

Properties

firstFrameRecord

val firstFrameRecord: Record

The first state record in a linked list of state records.

size

val size: Int