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

Extensions for kotlin.collections.List

dropLast

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

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

dropLastWhileF

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

fun <T> List<T>.dropLastWhileF(predicate: (T) -> Field<Boolean>): Field<List<T>>

elementAt

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

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

elementAtOrElse

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

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

elementAtOrNull

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

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

findLastF

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

fun <T> List<T>.findLastF(predicate: (T) -> Field<Boolean>): Field<T?>

foldRight

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

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

foldRightIndexed

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

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

get

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

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

getOrElse

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

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

getOrNull

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

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

indexOfFirstF

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

fun <T> List<T>.indexOfFirstF(predicate: (T) -> Field<Boolean>): Field<Int>

indexOfLastF

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

fun <T> List<T>.indexOfLastF(predicate: (T) -> Field<Boolean>): Field<Int>

lastF

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

fun <T> List<T>.lastF(predicate: (T) -> Field<Boolean>): Field<T>

lastOrNullF

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

fun <T> List<T>.lastOrNullF(predicate: (T) -> Field<Boolean>): Field<T?>

slice

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

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

subList

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

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

takeLast

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

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

takeLastWhileF

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

fun <T> List<T>.takeLastWhileF(predicate: (T) -> Field<Boolean>): Field<List<T>>