Documentation / dataflow-async / com.femastudios.dataflow.async.extensions / kotlin.collections.List
Go to reference

Extensions for kotlin.collections.List

allLoaded

Whether all Attributes in this list are loaded.

fun List<Attribute<*>>.allLoaded(stayTrueOnceLoaded: Boolean = false): Field<Boolean>

anyLoading

Whether an Attribute in this list is loading.

fun List<Attribute<*>>.anyLoading(stayFalseOnceLoaded: Boolean = false): Field<Boolean>

dropLast

Same as dropLast, but accepts Attribute and returns a new Attribute.

fun <T> List<T>.dropLast(n: Attribute<Int>): Attribute<List<T>>

dropLastWhileA

Same as dropLastWhile, but accepts Attribute and returns a new Attribute.

fun <T> List<T>.dropLastWhileA(predicate: (T) -> Attribute<Boolean>): Attribute<List<T>>

elementAt

Same as elementAt, but accepts Attribute and returns a new Attribute.

fun <T> List<T>.elementAt(index: Attribute<Int>): Attribute<T>

elementAtOrElse

Same as elementAtOrElse, but accepts Attribute and returns a new Attribute.

fun <T> List<T>.elementAtOrElse(index: Attribute<Int>, defaultValue: (Int) -> T): Attribute<T>

elementAtOrNull

Same as elementAtOrNull, but accepts Attribute and returns a new Attribute.

fun <T> List<T>.elementAtOrNull(index: Attribute<Int>): Attribute<T?>

findLastA

Same as findLast, but accepts Attribute and returns a new Attribute.

fun <T> List<T>.findLastA(predicate: (T) -> Attribute<Boolean>): Attribute<T?>

foldRight

Same as foldRight, but accepts Attribute and returns a new Attribute.

fun <T, R> List<T>.foldRight(initial: Attribute<R>, operation: (T, acc: R) -> R): Attribute<R>

foldRightIndexed

Same as foldRightIndexed, but accepts Attribute and returns a new Attribute.

fun <T, R> List<T>.foldRightIndexed(initial: Attribute<R>, operation: (index: Int, T, acc: R) -> R): Attribute<R>

get

Same as get, but accepts Attribute and returns a new Attribute.

operator fun <E> List<E>.get(index: Attribute<Int>): Attribute<E>

getOrElse

Same as getOrElse, but accepts Attribute and returns a new Attribute.

fun <T> List<T>.getOrElse(index: Attribute<Int>, defaultValue: (Int) -> T): Attribute<T>

getOrNull

Same as getOrNull, but accepts Attribute and returns a new Attribute.

fun <T> List<T>.getOrNull(index: Attribute<Int>): Attribute<T?>

indexOfFirstA

Same as indexOfFirst, but accepts Attribute and returns a new Attribute.

fun <T> List<T>.indexOfFirstA(predicate: (T) -> Attribute<Boolean>): Attribute<Int>

indexOfLastA

Same as indexOfLast, but accepts Attribute and returns a new Attribute.

fun <T> List<T>.indexOfLastA(predicate: (T) -> Attribute<Boolean>): Attribute<Int>

lastA

Same as last, but accepts Attribute and returns a new Attribute.

fun <T> List<T>.lastA(predicate: (T) -> Attribute<Boolean>): Attribute<T>

lastOrNullA

Same as lastOrNull, but accepts Attribute and returns a new Attribute.

fun <T> List<T>.lastOrNullA(predicate: (T) -> Attribute<Boolean>): Attribute<T?>

slice

Same as slice, but accepts Attribute and returns a new Attribute.

fun <T> List<T>.slice(indices: Attribute<Iterable<Int>>): Attribute<List<T>>
fun <T> List<T>.slice(indices: Attribute<IntRange>): Attribute<List<T>>

subList

Same as subList, but accepts Attribute and returns a new Attribute.

fun <E> List<E>.subList(fromIndex: Attribute<Int>, toIndex: Attribute<Int>): Attribute<List<E>>
fun <E> List<E>.subList(fromIndex: Attribute<Int>, toIndex: Int): Attribute<List<E>>
fun <E> List<E>.subList(fromIndex: Int, toIndex: Attribute<Int>): Attribute<List<E>>

takeLast

Same as takeLast, but accepts Attribute and returns a new Attribute.

fun <T> List<T>.takeLast(n: Attribute<Int>): Attribute<List<T>>

takeLastWhileA

Same as takeLastWhile, but accepts Attribute and returns a new Attribute.

fun <T> List<T>.takeLastWhileA(predicate: (T) -> Attribute<Boolean>): Attribute<List<T>>