ReadonlyObservableList

abstract class ReadonlyObservableList<T> : ValueObservable<List<T>> , Iterable<T>

An observable List implementation.

Constructors

Link copied to clipboard
fun ReadonlyObservableList()

Functions

Link copied to clipboard
fun addListener(listener: ValueObserver<List<T>>)

Adds a listener silently.

Link copied to clipboard
fun addListenerAndInvoke(initialValue: List<T>, listener: (List<T>, List<T>) -> Unit)

Adds a listener and calls ValueObserver.update on this new listener with given initial value.

Link copied to clipboard
fun clearListeners()

Removes all listeners.

Link copied to clipboard
operator fun contains(o: Any?): Boolean

Returns true if this list contains the specified element.

Link copied to clipboard
open fun forEach(p0: Consumer<in T>)
Link copied to clipboard
operator fun get(index: Int): T

Returns the element at the specified position in this list.

Link copied to clipboard
fun getOrNull(index: Int): T?

May return the element at the specified position in this list or null.

Link copied to clipboard
fun indexOf(o: Any?): Int

Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element.

Link copied to clipboard
fun isEmpty(): Boolean

Returns true if this list contains no elements.

Link copied to clipboard
fun isNotEmpty(): Boolean

Returns true if this list contains elements.

Link copied to clipboard
open operator override fun iterator(): Iterator<T>

Returns an Iterator over the elements in this ReadonlyObservableList.

Link copied to clipboard
fun lastIndexOf(o: Any?): Int

Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element.

Link copied to clipboard
fun removeListener(listener: ValueObserver<List<T>>): Boolean

Removes a listener.

Link copied to clipboard
override fun spliterator(): Spliterator<T>

Creates a fail-fastSpliterator over the elements in this list.

Properties

Link copied to clipboard
val indices: IntRange

All available indices of this list as IntRange i.e. 0..size()-1.

Link copied to clipboard
val size: Int

Returns the number of elements in this list.

Inheritors

Link copied to clipboard