Package-level declarations

Functions

Link copied to clipboard
inline fun <T> List<T>.atLeast(n: Int, predicate: (T) -> Boolean): Boolean

Returns true if at least n elements in the list match the given predicate.

Link copied to clipboard
inline fun <T> List<T>.atMost(n: Int, predicate: (T) -> Boolean): Boolean

Returns true if at most n elements in the list match the given predicate.

Link copied to clipboard
inline fun List<Double>.filter(predicate: (Double) -> Boolean): DoubleList

Returns a DoubleList containing only elements matching the given predicate.

inline fun List<Float>.filter(predicate: (Float) -> Boolean): FloatList

Returns a FloatList containing only elements matching the given predicate.

inline fun List<Int>.filter(predicate: (Int) -> Boolean): IntList

Returns a IntList containing only elements matching the given predicate.

inline fun List<Long>.filter(predicate: (Long) -> Boolean): LongList

Returns a LongList containing only elements matching the given predicate.

Link copied to clipboard
fun <T> List<List<T>>.filterFlattened(predicate: (T) -> Boolean): List<T>

Returns a flattened list containing only the elements that match the given predicate.

Returns a flattened DoubleList containing only elements that match the given predicate.

Returns a flattened FloatList containing only elements that match the given predicate.

fun List<List<Int>>.filterFlattened(predicate: (Int) -> Boolean): IntList

Returns a flattened IntList containing only elements that match the given predicate.

Returns a flattened LongList containing only elements that match the given predicate.

Link copied to clipboard
inline fun List<Double>.filterNot(predicate: (Double) -> Boolean): DoubleList

Returns a DoubleList containing only elements NOT matching the given predicate.

inline fun List<Float>.filterNot(predicate: (Float) -> Boolean): FloatList

Returns a FloatList containing only elements NOT matching the given predicate.

inline fun List<Int>.filterNot(predicate: (Int) -> Boolean): IntList

Returns a IntList containing only elements NOT matching the given predicate.

inline fun List<Long>.filterNot(predicate: (Long) -> Boolean): LongList

Returns a LongList containing only elements NOT matching the given predicate.

Link copied to clipboard

Returns a DoubleList containing all non-null elements.

Returns a FloatList containing all non-null elements.

Returns a IntList containing all non-null elements.

Returns a LongList containing all non-null elements.

Link copied to clipboard
fun <T> List<List<T>>.findFlattened(predicate: (T) -> Boolean): T?

Finds the first element in the nested lists that matches predicate, or returns null if none found (generic version).

Link copied to clipboard
@JvmName(name = "flatMapList")
inline fun <T> List<T>.flatMap(computeSize: Boolean = false, transform: (T) -> List<Double>): DoubleList
inline fun <T> List<T>.flatMap(computeSize: Boolean = false, transform: (T) -> DoubleList): DoubleList

Returns a single DoubleList of all elements yielded from results of transform function being invoked on each element of original collection.

@JvmName(name = "flatMapList")
inline fun <T> List<T>.flatMap(computeSize: Boolean = false, transform: (T) -> List<Float>): FloatList
inline fun <T> List<T>.flatMap(computeSize: Boolean = false, transform: (T) -> FloatList): FloatList

Returns a single FloatList of all elements yielded from results of transform function being invoked on each element of original collection.

@JvmName(name = "flatMapList")
inline fun <T> List<T>.flatMap(computeSize: Boolean = false, transform: (T) -> List<Int>): IntList
inline fun <T> List<T>.flatMap(computeSize: Boolean = false, transform: (T) -> IntList): IntList

Returns a single IntList of all elements yielded from results of transform function being invoked on each element of original collection.

@JvmName(name = "flatMapList")
inline fun <T> List<T>.flatMap(computeSize: Boolean = false, transform: (T) -> List<Long>): LongList
inline fun <T> List<T>.flatMap(computeSize: Boolean = false, transform: (T) -> LongList): LongList

Returns a single LongList of all elements yielded from results of transform function being invoked on each element of original collection.

Link copied to clipboard
@JvmName(name = "flattenListDouble")
inline fun List<List<Double>>.flatten(): DoubleList

Flattens a List of List into a single DoubleList.

@JvmName(name = "flattenListFloat")
inline fun List<List<Float>>.flatten(): FloatList

Flattens a List of List into a single FloatList.

@JvmName(name = "flattenListInt")
inline fun List<List<Int>>.flatten(): IntList

Flattens a List of List into a single IntList.

@JvmName(name = "flattenListLong")
inline fun List<List<Long>>.flatten(): LongList

Flattens a List of List into a single LongList.

Flattens a List of DoubleList into a single DoubleList.

Flattens a List of FloatList into a single FloatList.

inline fun List<IntList>.flatten(): IntList

Flattens a List of IntList into a single IntList.

inline fun List<LongList>.flatten(): LongList

Flattens a List of LongList into a single LongList.

Link copied to clipboard
fun <T> List<List<T>>.forEachFlattened(action: (T) -> Unit)

Iterates over each element in all nested lists and applies the given action.

Link copied to clipboard
inline fun <T> List<T>.map(transform: (T) -> Double): DoubleList

Returns a DoubleList containing the results of applying the given transform function to each element in the original list.

inline fun <T> List<T>.map(transform: (T) -> Float): FloatList

Returns a FloatList containing the results of applying the given transform function to each element in the original list.

inline fun <T> List<T>.map(transform: (T) -> Int): IntList

Returns a IntList containing the results of applying the given transform function to each element in the original list.

inline fun <T> List<T>.map(transform: (T) -> Long): LongList

Returns a LongList containing the results of applying the given transform function to each element in the original list.

inline fun <R> DoubleList.map(transform: (Double) -> R): List<R>

Returns an List containing the results of applying the given transform function to each element in the original DoubleList.

inline fun DoubleList.map(transform: (Double) -> Double): DoubleList

Returns a DoubleList containing the results of applying the given transform function to each element in the original DoubleList.

inline fun DoubleList.map(transform: (Double) -> Float): FloatList

Returns a FloatList containing the results of applying the given transform function to each element in the original DoubleList.

inline fun DoubleList.map(transform: (Double) -> Int): IntList

Returns a IntList containing the results of applying the given transform function to each element in the original DoubleList.

inline fun DoubleList.map(transform: (Double) -> Long): LongList

Returns a LongList containing the results of applying the given transform function to each element in the original DoubleList.

inline fun <R> FloatList.map(transform: (Float) -> R): List<R>

Returns an List containing the results of applying the given transform function to each element in the original FloatList.

inline fun FloatList.map(transform: (Float) -> Double): DoubleList

Returns a DoubleList containing the results of applying the given transform function to each element in the original FloatList.

inline fun FloatList.map(transform: (Float) -> Float): FloatList

Returns a FloatList containing the results of applying the given transform function to each element in the original FloatList.

inline fun FloatList.map(transform: (Float) -> Int): IntList

Returns a IntList containing the results of applying the given transform function to each element in the original FloatList.

inline fun FloatList.map(transform: (Float) -> Long): LongList

Returns a LongList containing the results of applying the given transform function to each element in the original FloatList.

inline fun <R> IntList.map(transform: (Int) -> R): List<R>

Returns an List containing the results of applying the given transform function to each element in the original IntList.

inline fun IntList.map(transform: (Int) -> Double): DoubleList

Returns a DoubleList containing the results of applying the given transform function to each element in the original IntList.

inline fun IntList.map(transform: (Int) -> Float): FloatList

Returns a FloatList containing the results of applying the given transform function to each element in the original IntList.

inline fun IntList.map(transform: (Int) -> Int): IntList

Returns a IntList containing the results of applying the given transform function to each element in the original IntList.

inline fun IntList.map(transform: (Int) -> Long): LongList

Returns a LongList containing the results of applying the given transform function to each element in the original IntList.

inline fun <R> LongList.map(transform: (Long) -> R): List<R>

Returns an List containing the results of applying the given transform function to each element in the original LongList.

inline fun LongList.map(transform: (Long) -> Double): DoubleList

Returns a DoubleList containing the results of applying the given transform function to each element in the original LongList.

inline fun LongList.map(transform: (Long) -> Float): FloatList

Returns a FloatList containing the results of applying the given transform function to each element in the original LongList.

inline fun LongList.map(transform: (Long) -> Int): IntList

Returns a IntList containing the results of applying the given transform function to each element in the original LongList.

inline fun LongList.map(transform: (Long) -> Long): LongList

Returns a LongList containing the results of applying the given transform function to each element in the original LongList.

Link copied to clipboard
fun <T, E> List<List<T>>.mapFlattened(transform: (T) -> E): List<E>

Returns a flattened list produced by applying transform to each element of the nested lists (generic version).

fun <T> List<List<T>>.mapFlattened(transform: (T) -> Double): DoubleList

Returns a flattened DoubleList produced by applying transform to each element of the nested lists.

fun <T> List<List<T>>.mapFlattened(transform: (T) -> Float): FloatList

Returns a flattened FloatList produced by applying transform to each element of the nested lists.

fun <T> List<List<T>>.mapFlattened(transform: (T) -> Int): IntList

Returns a flattened IntList produced by applying transform to each element of the nested lists.

fun <T> List<List<T>>.mapFlattened(transform: (T) -> Long): LongList

Returns a flattened LongList produced by applying transform to each element of the nested lists.

Link copied to clipboard
inline fun <T> List<T>.mapIndexed(transform: (Int, T) -> Double): DoubleList

Returns a DoubleList containing the results of applying the given transform function to each element and its index in the original list.

inline fun <T> List<T>.mapIndexed(transform: (Int, T) -> Float): FloatList

Returns a FloatList containing the results of applying the given transform function to each element and its index in the original list.

inline fun <T> List<T>.mapIndexed(transform: (Int, T) -> Int): IntList

Returns a IntList containing the results of applying the given transform function to each element and its index in the original list.

inline fun <T> List<T>.mapIndexed(transform: (Int, T) -> Long): LongList

Returns a LongList containing the results of applying the given transform function to each element and its index in the original list.

inline fun <R> DoubleList.mapIndexed(transform: (Int, Double) -> R): List<R>

Returns a List containing the results of applying the given transform function to each element and its index in the original DoubleList.

inline fun DoubleList.mapIndexed(transform: (Int, Double) -> Double): DoubleList

Returns a DoubleList containing the results of applying the given transform function to each element and its index in the original DoubleList.

inline fun DoubleList.mapIndexed(transform: (Int, Double) -> Float): FloatList

Returns a FloatList containing the results of applying the given transform function to each element and its index in the original DoubleList.

inline fun DoubleList.mapIndexed(transform: (Int, Double) -> Int): IntList

Returns a IntList containing the results of applying the given transform function to each element and its index in the original DoubleList.

inline fun DoubleList.mapIndexed(transform: (Int, Double) -> Long): LongList

Returns a LongList containing the results of applying the given transform function to each element and its index in the original DoubleList.

inline fun <R> FloatList.mapIndexed(transform: (Int, Float) -> R): List<R>

Returns a List containing the results of applying the given transform function to each element and its index in the original FloatList.

inline fun FloatList.mapIndexed(transform: (Int, Float) -> Double): DoubleList

Returns a DoubleList containing the results of applying the given transform function to each element and its index in the original FloatList.

inline fun FloatList.mapIndexed(transform: (Int, Float) -> Float): FloatList

Returns a FloatList containing the results of applying the given transform function to each element and its index in the original FloatList.

inline fun FloatList.mapIndexed(transform: (Int, Float) -> Int): IntList

Returns a IntList containing the results of applying the given transform function to each element and its index in the original FloatList.

inline fun FloatList.mapIndexed(transform: (Int, Float) -> Long): LongList

Returns a LongList containing the results of applying the given transform function to each element and its index in the original FloatList.

inline fun <R> IntList.mapIndexed(transform: (Int, Int) -> R): List<R>

Returns a List containing the results of applying the given transform function to each element and its index in the original IntList.

inline fun IntList.mapIndexed(transform: (Int, Int) -> Double): DoubleList

Returns a DoubleList containing the results of applying the given transform function to each element and its index in the original IntList.

inline fun IntList.mapIndexed(transform: (Int, Int) -> Float): FloatList

Returns a FloatList containing the results of applying the given transform function to each element and its index in the original IntList.

inline fun IntList.mapIndexed(transform: (Int, Int) -> Int): IntList

Returns a IntList containing the results of applying the given transform function to each element and its index in the original IntList.

inline fun IntList.mapIndexed(transform: (Int, Int) -> Long): LongList

Returns a LongList containing the results of applying the given transform function to each element and its index in the original IntList.

inline fun <R> LongList.mapIndexed(transform: (Int, Long) -> R): List<R>

Returns a List containing the results of applying the given transform function to each element and its index in the original LongList.

inline fun LongList.mapIndexed(transform: (Int, Long) -> Double): DoubleList

Returns a DoubleList containing the results of applying the given transform function to each element and its index in the original LongList.

inline fun LongList.mapIndexed(transform: (Int, Long) -> Float): FloatList

Returns a FloatList containing the results of applying the given transform function to each element and its index in the original LongList.

inline fun LongList.mapIndexed(transform: (Int, Long) -> Int): IntList

Returns a IntList containing the results of applying the given transform function to each element and its index in the original LongList.

inline fun LongList.mapIndexed(transform: (Int, Long) -> Long): LongList

Returns a LongList containing the results of applying the given transform function to each element and its index in the original LongList.

Link copied to clipboard
inline fun <T> List<T>.mapNotNull(transform: (T) -> Double?): DoubleList
inline fun <T> List<T>.mapNotNull(transform: (T) -> Float?): FloatList
inline fun <T> List<T>.mapNotNull(transform: (T) -> Int?): IntList
inline fun <T> List<T>.mapNotNull(transform: (T) -> Long?): LongList

Returns a list containing only the non-null results of applying the given transform function to each element in the original list.