Package-level declarations

Functions

Link copied to clipboard
inline fun <T> buildObservableList(builderAction: MutableList<T>.() -> Unit): List<T>

Builds a new read-only ObservableList by populating a MutableList using the given builderAction and returning a read-only list with the same elements.

Link copied to clipboard
inline fun <K, V> buildObservableMap(builderAction: MutableMap<K, V>.() -> Unit): Map<K, V>

Builds a new read-only ObservableMap by populating a MutableMap using the given builderAction and returning a read-only map with the same elements.

Link copied to clipboard
inline fun <T> buildObservableSet(builderAction: MutableSet<T>.() -> Unit): Set<T>

Builds a new read-only ObservableSet by populating a MutableSet using the given builderAction and returning a read-only set with the same elements.

Link copied to clipboard
operator fun ObservableFloatArray.contains(element: Float): Boolean
operator fun ObservableIntegerArray.contains(element: Int): Boolean

Returns true if element is found in the array.

Link copied to clipboard
inline fun ObservableFloatArray.copyOf(): ObservableFloatArray
inline fun ObservableIntegerArray.copyOf(): ObservableIntegerArray

Returns new observable array which is a copy of the original array.

Link copied to clipboard
inline fun <T> ObservableList<T>.copyTo(src: List<T>)

Copies elements from src to list, firing change notification once.

Link copied to clipboard
inline fun emptyObservableFloatArray(): ObservableFloatArray

Creates a new empty observable Float array.

Link copied to clipboard
inline fun emptyObservableIntArray(): ObservableIntegerArray

Creates a new empty observable Int array.

Link copied to clipboard
inline fun <T> emptyObservableList(): ObservableList<T>

Returns an empty read-only ObservableList.

Link copied to clipboard
inline fun <K, V> emptyObservableMap(): ObservableMap<K, V>

Returns an empty read-only ObservableMap.

Link copied to clipboard
inline fun <T> emptyObservableSet(): ObservableSet<T>

Returns an empty read-only ObservableSet.

Link copied to clipboard
inline fun <T> ObservableList<T>.fillTo(obj: T)

Fills the list with obj, firing change notification once.

Link copied to clipboard
inline fun ObservableFloatArray.forEach(action: (Float) -> Unit)
inline fun ObservableIntegerArray.forEach(action: (Int) -> Unit)

Performs the given action on each element.

Link copied to clipboard
inline fun ObservableFloatArray.forEachIndexed(action: (index: Int, Float) -> Unit)
inline fun ObservableIntegerArray.forEachIndexed(action: (index: Int, Int) -> Unit)

Performs the given action on each element, providing sequential index with the element.

Link copied to clipboard
inline fun ObservableFloatArray.getOrElse(index: Int, defaultValue: (Int) -> Float): Float
inline fun ObservableIntegerArray.getOrElse(index: Int, defaultValue: (Int) -> Int): Int

Returns an element at the given index or the result of calling the defaultValue function if the index is out of bounds of this array.

Link copied to clipboard
fun ObservableFloatArray.getOrNull(index: Int): Float?
fun ObservableIntegerArray.getOrNull(index: Int): Int?

Returns an element at the given index or null if the index is out of bounds of this array.

Link copied to clipboard
fun ObservableFloatArray.indexOf(element: Float): Int
fun ObservableIntegerArray.indexOf(element: Int): Int

Returns first index of element, or -1 if the array does not contain element.

Link copied to clipboard
inline fun ObservableArray<*>.isEmpty(): Boolean

Returns true if the array is empty.

Link copied to clipboard
inline fun ObservableArray<*>.isNotEmpty(): Boolean

Returns true if the array is not empty.

Link copied to clipboard
operator fun ObservableFloatArray.iterator(): FloatIterator
operator fun ObservableIntegerArray.iterator(): IntIterator

Creates an iterator over the elements of the array.

Link copied to clipboard
fun ObservableFloatArray.lastIndexOf(element: Float): Int
fun ObservableIntegerArray.lastIndexOf(element: Int): Int

Returns last index of element, or -1 if the array does not contain element.

Link copied to clipboard
inline fun <T> mutableObservableListOf(): ObservableList<T>

Returns an empty ObservableList.

fun <T> mutableObservableListOf(vararg elements: T): ObservableList<T>

Returns a new ObservableList with the given elements.

Link copied to clipboard
inline fun <K, V> mutableObservableMapOf(): ObservableMap<K, V>

Returns an empty ObservableMap.

fun <K, V> mutableObservableMapOf(vararg pairs: Pair<K, V>): ObservableMap<K, V>

Returns a new ObservableMap with the given elements.

Link copied to clipboard
inline fun <T> mutableObservableSetOf(): ObservableSet<T>

Returns an empty ObservableSet.

fun <T> mutableObservableSetOf(vararg elements: T): ObservableSet<T>

Returns a new ObservableSet with the given elements.

Link copied to clipboard
inline fun observableFloatArrayOf(): ObservableFloatArray

Creates a new empty observable Float array.

fun observableFloatArrayOf(vararg elements: Float): ObservableFloatArray

Returns an observable array containing the specified Float numbers.

Link copied to clipboard
inline fun observableIntArrayOf(): ObservableIntegerArray

Creates a new empty observable Int array.

fun observableIntArrayOf(vararg elements: Int): ObservableIntegerArray

Returns an observable array containing the specified Int numbers.

Link copied to clipboard
inline fun <T> observableListOf(): ObservableList<T>

Returns an empty read-only ObservableList.

inline fun <T> observableListOf(element: T): ObservableList<T>

Returns an empty read-only ObservableList of one element.

fun <T> observableListOf(vararg elements: T): ObservableList<T>

Returns a new read-only ObservableList of given elements.

Link copied to clipboard
fun <T : Any> observableListOfNotNull(element: T?): ObservableList<T>

Returns a new read-only ObservableList either of single given element, if it is not null, or empty list if the element is null.

fun <T : Any> observableListOfNotNull(vararg elements: T?): ObservableList<T>

Returns a new read-only ObservableList only of those given elements, that are not null.

Link copied to clipboard
inline fun <K, V> observableMapOf(): ObservableMap<K, V>

Returns an empty read-only ObservableMap.

fun <K, V> observableMapOf(vararg pairs: Pair<K, V>): ObservableMap<K, V>

Returns a new read-only ObservableMap of given pairs.

Link copied to clipboard
inline fun <T> observableSetOf(): ObservableSet<T>

Returns an empty read-only ObservableSet.

fun <T> observableSetOf(vararg elements: T): ObservableSet<T>

Returns a new read-only ObservableSet of given elements.

Link copied to clipboard
fun <T : Any> observableSetOfNotNull(vararg elements: T?): ObservableSet<T>

Returns a new read-only ObservableSet only of those given elements, that are not null.

Link copied to clipboard
inline operator fun ObservableFloatArray.plusAssign(elements: ObservableFloatArray)
inline operator fun ObservableIntegerArray.plusAssign(elements: ObservableIntegerArray)

Adds all elements of the given elements observable array to this observable array.

inline operator fun ObservableFloatArray.plusAssign(element: Float)
inline operator fun ObservableIntegerArray.plusAssign(element: Int)

Adds the specified element to this observable array.

inline operator fun ObservableFloatArray.plusAssign(elements: FloatArray)
inline operator fun ObservableIntegerArray.plusAssign(elements: IntArray)

Adds all elements of the given elements array to this observable array.

Link copied to clipboard
inline fun <T> ObservableList<T>.replaceAll(oldVal: T, newVal: T): Boolean

Replace all oldVal elements in the list with newVal element, firing change notification once.

Link copied to clipboard
inline fun ObservableList<*>.reverse()

Reverse the order in the list, firing change notification once.

Link copied to clipboard
inline fun ObservableList<*>.rotate(distance: Int)

Rotates the list by distance, firing change notification once.

Link copied to clipboard
inline fun ObservableList<*>.shuffle(rnd: Random? = null)

Shuffles all elements in the observable list, firing change notification once.

Link copied to clipboard
inline fun <T : Comparable<T>> ObservableList<T>.sort()

Sorts the provided observable list, firing change notification once.

infix inline fun <T> ObservableList<T>.sort(c: Comparator<T>)

Sorts the provided observable list using the c comparator, firing change notification once.

Link copied to clipboard
fun ObservableFloatArray.toFloatArray(): FloatArray
fun ObservableIntegerArray.toFloatArray(): IntArray

Returns an array containing copy of the observable array.

Link copied to clipboard
inline fun <T> Array<out T>.toMutableObservableList(): ObservableList<T>

Returns a new ObservableList filled with all elements of this array.

inline fun <T> Collection<T>.toMutableObservableList(): ObservableList<T>
fun <T> Iterable<T>.toMutableObservableList(): ObservableList<T>

Returns a new ObservableList filled with all elements of this collection.

fun <T> Sequence<T>.toMutableObservableList(): ObservableList<T>

Returns a new ObservableList filled with all elements of this sequence.

Link copied to clipboard
inline fun <K, V> Map<K, V>.toMutableObservableMap(): ObservableMap<K, V>

Returns a new ObservableMap filled with all elements of this map.

Link copied to clipboard
inline fun <T> Array<out T>.toMutableObservableSet(): ObservableSet<T>

Returns a new ObservableSet filled with all elements of this array.

fun <T> Iterable<T>.toMutableObservableSet(): ObservableSet<T>

Returns a new ObservableSet filled with all elements of this collection.

fun <T> Sequence<T>.toMutableObservableSet(): ObservableSet<T>

Returns a new ObservableSet filled with all elements of this sequence.

Link copied to clipboard
inline fun FloatArray.toObservableArray(): ObservableFloatArray

Returns an observable array containing all of the Float numbers of this primitive array.

inline fun IntArray.toObservableArray(): ObservableIntegerArray

Returns an observable array containing all of the Int numbers of this primitive array.

Link copied to clipboard
fun <T> Array<out T>.toObservableList(): ObservableList<T>
fun <T> Iterable<T>.toObservableList(): ObservableList<T>

Returns an ObservableList containing all elements.

fun <T> Sequence<T>.toObservableList(): ObservableList<T>

Returns a ObservableList containing all elements.

Link copied to clipboard
fun <K, V> Map<K, V>.toObservableMap(): ObservableMap<K, V>

Returns an ObservableMap containing all elements.

Link copied to clipboard
fun <T> Array<out T>.toObservableSet(): ObservableSet<T>
fun <T> Iterable<T>.toObservableSet(): ObservableSet<T>

Returns an ObservableSet containing all elements.

fun <T> Sequence<T>.toObservableSet(): ObservableSet<T>

Returns a ObservableSet containing all elements.

Properties

Link copied to clipboard
val ObservableArray<*>.indices: IntRange

Returns the range of valid indices for the array.

Link copied to clipboard
val ObservableArray<*>.lastIndex: Int

Returns the last valid index for the array.

Link copied to clipboard
val ObservableArray<*>.sizeBinding: IntegerBinding

Creates a new IntegerBinding that contains the size of this array.