Patch

sealed class Patch<out T>

A Patch describes the changes made to a List.

Types

Delete
Link copied to clipboard
js
data class Delete<T>(start: Int, count: Int) : Patch<T>
A Patch saying, that one or more elements have been deleted
Insert
Link copied to clipboard
js
data class Insert<T>(element: T, index: Int) : Patch<T>
A Patch saying, that a new element has been inserted
InsertMany
Link copied to clipboard
js
data class InsertMany<T>(elements: List<T>, index: Int) : Patch<T>
A Patch saying, that a several element have been inserted
Move
Link copied to clipboard
js
data class Move<T>(from: Int, to: Int) : Patch<T>
A Patch saying, that an element has been moved from one position to another.

Functions

map
Link copied to clipboard
js
abstract fun <R> map(parentJob: Job, mapping: (T, Job) -> R): Patch<R>
a convenience-method, to map the values encapsulated in a Patch

Inheritors

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