DirtyList

class DirtyList<T>(delegate: MutableList<T>, callback: (item: T, list: DirtyList<T>) -> Unit = { _, _ -> })

A mutable list that tracks every mutation, including iterator and sub-list changes.

Constructors

Link copied to clipboard
constructor(delegate: MutableList<T>, callback: (item: T, list: DirtyList<T>) -> Unit = { _, _ -> })

Properties

Link copied to clipboard
open val size: Int

Functions

Link copied to clipboard
open fun add(index: Int, element: T)
Link copied to clipboard
Link copied to clipboard
open fun get(index: Int): T
Link copied to clipboard
fun getChanges(): List<T>
Link copied to clipboard
open fun removeAt(index: Int): T
Link copied to clipboard
open fun set(index: Int, element: T): T