Patch

sealed class Patch<out T>

A Patch describes the changes made to a List.

Types

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

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

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

A Patch saying, that a new element has been inserted

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

A Patch saying, that a several element have been inserted

Link copied to clipboard
data class Move<T>(from: Int, 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