Patch

sealed class Patch<out T>

A Patch describes the changes made to a List.

Types

Link copied to clipboard
data class Delete<T>(val start: Int, val count: Int = 1) : Patch<T>

A Patch saying, that one or more elements have been deleted

Link copied to clipboard
data class Insert<T>(val element: T, val index: Int) : Patch<T>

A Patch saying, that a new element has been inserted

Link copied to clipboard
data class InsertMany<T>(val elements: List<T>, val index: Int) : Patch<T>

A Patch saying, that a several element have been inserted

Link copied to clipboard
data class Move<T>(val from: Int, val to: Int) : Patch<T>

A Patch saying, that an element has been moved from one position to another. This is only used on mounts with a corresponding IdProvider.

Functions

Link copied to clipboard
abstract fun <R> map(parentJob: Job, mapping: (T, Job) -> R): Patch<R>

a convenience-method, to map the values encapsulated in a Patch

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard