kbox-jvm / ch.tutteli.kbox

Package ch.tutteli.kbox

Types

PeekingIterator

expect class PeekingIterator<out T> : Iterator<T>

PeekingIteratorUnsynchronized

class PeekingIteratorUnsynchronized<out T> : Iterator<T>

WithIndex

data class WithIndex<out T>

A named pair with index and value.

Extensions for External Classes

kotlin.Array

kotlin.collections.Iterable

kotlin.collections.Iterator

kotlin.collections.List

kotlin.collections.Map

kotlin.sequences.Sequence

Functions

forEachIn

fun <T> forEachIn(arr1: Array<T>, arr2: Array<T>, action: (T) -> Unit): Unit

Applies action to each entry in arr1 and in arr2.

fun <T> forEachIn(arr1: Array<T>, arr2: Array<T>, arr3: Array<T>, action: (T) -> Unit): Unit

Applies action to each entry in arr1, arr2 and in arr3.

fun <T> forEachIn(arr1: Array<T>, arr2: Array<T>, arr3: Array<T>, vararg arrays: Array<T>, action: (T) -> Unit): Unit

Applies action to each entry in arr1, arr2, arr3 and to each entry of Array in arrays.

fun <T> forEachIn(iterable1: Iterable<T>, iterable2: Iterable<T>, action: (T) -> Unit): Unit

Applies action to each entry in iterable1 and in iterable2.

fun <T> forEachIn(iterable1: Iterable<T>, iterable2: Iterable<T>, iterable3: Iterable<T>, action: (T) -> Unit): Unit

Applies action to each entry in iterable1, iterable2 and in iterable3.

fun <T> forEachIn(iterable1: Iterable<T>, iterable2: Iterable<T>, iterable3: Iterable<T>, vararg iterables: Iterable<T>, action: (T) -> Unit): Unit

Applies action to each entry in iterable1, iterable2, iterable3 and to each entry of Iterable in iterables.

fun <T> forEachIn(sequence1: Sequence<T>, sequence2: Sequence<T>, action: (T) -> Unit): Unit

Applies action to each entry in sequence1 and to each entry in sequence2.

fun <T> forEachIn(sequence1: Sequence<T>, sequence2: Sequence<T>, sequence3: Sequence<T>, action: (T) -> Unit): Unit

Applies action to each entry in sequence1, sequence2 and in sequence3.

fun <T> forEachIn(sequence1: Sequence<T>, sequence2: Sequence<T>, sequence3: Sequence<T>, vararg sequences: Sequence<T>, action: (T) -> Unit): Unit

Applies action to each entry in sequence1, sequence2, sequence3 and to each entry of Sequence in sequences.

forThisAndForEachIn

fun <E> E.forThisAndForEachIn(iterable: Array<E>, action: (E) -> Unit): Unit
fun <E> E.forThisAndForEachIn(iterable: Iterable<E>, action: (E) -> Unit): Unit

Applies action to this and to each entry in iterable.

fun <E> E.forThisAndForEachIn(arr1: Array<E>, arr2: Array<E>, action: (E) -> Unit): Unit

Applies action to this and to each entry in arr1 and in arr2.

fun <E> E.forThisAndForEachIn(arr1: Array<E>, arr2: Array<E>, vararg arrays: Array<E>, action: (E) -> Unit): Unit

Applies action to this and to each entry in arr1, arr2 and each entry of Iterable in arrays.

fun <E> E.forThisAndForEachIn(iterable1: Iterable<E>, iterable2: Iterable<E>, action: (E) -> Unit): Unit

Applies action to this and to each entry in iterable1 and in iterable2.

fun <E> E.forThisAndForEachIn(iterable1: Iterable<E>, iterable2: Iterable<E>, vararg iterables: Iterable<E>, action: (E) -> Unit): Unit

Applies action to this and to each entry in iterable1, iterable2 and each entry of Iterable in iterables.

fun <E> E.forThisAndForEachIn(sequence: Sequence<E>, action: (E) -> Unit): Unit

Applies action to this and to each entry in sequence.

fun <E> E.forThisAndForEachIn(sequence1: Sequence<E>, sequence2: Sequence<E>, action: (E) -> Unit): Unit

Applies action to this and to each entry in sequence1 and in sequence2.

fun <E> E.forThisAndForEachIn(sequence1: Sequence<E>, sequence2: Sequence<E>, vararg sequences: Sequence<E>, action: (E) -> Unit): Unit

Applies action to this and to each entry in in sequence1, sequence2 and each entry of Sequence in sequences.

glue

infix fun <T> T.glue(otherArgs: Array<out T>): List<T>

Delegates to varargToList -- adds this and the otherArgs into a new List and returns it.

varargToList

fun <T> varargToList(arg: T, otherArgs: Array<out T>): List<T>

Adds the given arg and the otherArgs into a new List and returns it.