doc / ch.tutteli.atrium.domain.builders.utils / ArgumentMapperBuilder

ArgumentMapperBuilder

class ArgumentMapperBuilder<out T> (source)

Builder to map variable length arguments formulated as (first: T, vararg others : T) to something else.

Constructors

<init>

ArgumentMapperBuilder(first: T, others: Array<out T>)

Builder to map variable length arguments formulated as (first: T, vararg others : T) to something else.

Properties

first

val first: T

others

val others: Array<out T>

Functions

to

fun <R> to(mapper: (T) -> R): <ERROR CLASS><R, Array<out R>>

Maps each argument to the given type R by using the given mapper

toAssert

fun <R : Any> toAssert(assertionCreator: Assert<R>.(T) -> Unit): <ERROR CLASS><Assert<R>.() -> Unit, Array<Assert<R>.() -> Unit>>

Maps each argument to an Assert<R> lambda with receiver using the given assertionCreator (passing in the argument).

toAssertionPlantNullable

fun <R> toAssertionPlantNullable(assertionCreator: AssertionPlantNullable<R>.(T) -> Unit): <ERROR CLASS><AssertionPlantNullable<R>.() -> Unit, Array<AssertionPlantNullable<R>.() -> Unit>>

Maps each argument to an AssertionPlantNullable<R> lambda with receiver by using the given assertionCreator (passing in the argument).

Extension Functions

toNullOr

fun <T : Any> ArgumentMapperBuilder<T?>.toNullOr(): ArgumentToNullOrMapperBuilder<T>

Maps each argument to null if it is already null and if not, then ...