kbox-android / ch.tutteli.kbox

Package ch.tutteli.kbox

Types

DefaultPeekingIterator

class DefaultPeekingIterator<out T : Any> : PeekingIterator<T>

An Iterator which provides the peek function in addition.

PeekingIterator

interface PeekingIterator<out T : Any> : Iterator<T>

An Iterator which provides the peek function in addition.

WithIndex

data class WithIndex<out T>

A named pair with index and value.

Annotations

JvmSynchronized

expect annotation class JvmSynchronized

Stands for kotlin.jvm.Synchronized on the JVM platform and a dummy annotation on the other platforms.

Type Aliases

JvmSynchronized

actual typealias JvmSynchronized = Synchronized

Typealias for kotlin.jvm.Synchronized.

Extensions for External Classes

kotlin.Array

kotlin.CharSequence

kotlin.collections.Iterable

kotlin.collections.Iterator

kotlin.collections.List

kotlin.collections.Map

kotlin.sequences.Sequence

Functions

blankToNull

fun <T : CharSequence> T.blankToNull(): T?

Returns this CharSequence if it is not blank, null otherwise.

forEachIn

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

Applies action to each entry in arr1 and in arr2.

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

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

fun <T> forEachIn(arr1: Array<out T>, arr2: Array<out T>, arr3: Array<out T>, vararg arrays: Array<out 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.

forElementAndForEachIn

fun <E> forElementAndForEachIn(element: E, arr: Array<out E>, action: (E) -> Unit): Unit

Applies action to this and to each entry in arr.

fun <E> forElementAndForEachIn(element: E, arr1: Array<out E>, arr2: Array<out E>, action: (E) -> Unit): Unit

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

fun <E> forElementAndForEachIn(element: E, arr1: Array<out E>, arr2: Array<out E>, vararg arrays: Array<out 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> forElementAndForEachIn(element: E, iterable: Iterable<E>, action: (E) -> Unit): Unit

Applies action to this and to each entry in iterable.

fun <E> forElementAndForEachIn(element: E, 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> forElementAndForEachIn(element: E, 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> forElementAndForEachIn(element: E, sequence: Sequence<E>, action: (E) -> Unit): Unit

Applies action to this and to each entry in sequence.

fun <E> forElementAndForEachIn(element: E, 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> forElementAndForEachIn(element: E, 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.

Companion Object Functions

create

fun <T : Any> PeekingIterator.Companion.create(itr: Iterator<T>): PeekingIterator<T>

Platform independent method which creates a PeekingIterator based on a given itr.