SimpleMutableListModel

Constructors

Link copied to clipboard
constructor(list: ObservableList<T>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val changed: Pool<ModelObserver<T>>

Notifies of changes to the model

Inherited properties

Link copied to clipboard
open val isEmpty: Boolean

Indicates whether the model has any contents

Link copied to clipboard
open override val size: Int

Number of elements in the model

Functions

Link copied to clipboard
open override fun add(value: T)

Adds a new value to the end of the model.

open override fun add(index: Int, value: T)

Inserts a new value to the model at an index.

Link copied to clipboard
open override fun addAll(values: Collection<T>)

Adds values to the end of the model.

open override fun addAll(index: Int, values: Collection<T>)

Inserts values at index in the model.

Link copied to clipboard
open override fun clear()

Removes all items from the model.

Link copied to clipboard
open override fun notifyChanged(index: Int)

Forces the model to notify listeners that index changed. This is useful when the model has mutable items that change their internal state in some way that observers need to know about. Such changes cannot be detected by the model directly, since it relies on reference comparisons to detect changes.

Link copied to clipboard
open override fun remove(value: T)

Removes value from the model.

Link copied to clipboard
open override fun removeAll(values: Collection<T>)

Removes values from the model.

Link copied to clipboard
open override fun removeAllAt(indexes: Collection<Int>)

Removes all values at the given indexes from the model.

Link copied to clipboard
open override fun removeAt(index: Int): Result<T>

Removes the value at index from the model.

Link copied to clipboard
open override fun replaceAll(values: Collection<T>)

Replaces all values in the model with new items.

Link copied to clipboard
open override fun retainAll(values: Collection<T>)

Keeps only the items in the model that are contained within values.

Link copied to clipboard
open operator override fun set(index: Int, value: T): Result<T>

Set the value at a specific index.

Link copied to clipboard
open override fun <R : Comparable<R>> sortBy(selector: (T) -> R?)

Sorts the contents of the model ascending.

Link copied to clipboard
open override fun <R : Comparable<R>> sortByDescending(selector: (T) -> R?)

Sorts the contents of the model descending.

Link copied to clipboard
open override fun sortWith(comparator: Comparator<in T>)

Sorts the contents of the model ascending.

Link copied to clipboard
open override fun sortWithDescending(comparator: Comparator<in T>)

Sorts the contents of the model descending.

Inherited functions

Link copied to clipboard
open override fun contains(value: T): Boolean
Link copied to clipboard
open operator override fun get(index: Int): Result<T>
Link copied to clipboard
open operator override fun iterator(): Iterator<T>
Link copied to clipboard
open override fun section(range: ClosedRange<Int>): List<T>
Link copied to clipboard
Link copied to clipboard