fun <T> mapArguments(first: T, others: Array<out T>): ArgumentMapperBuilder<T>
(source)
Creates a ArgumentMapperBuilder with the given first and others as arguments; specify the mapping as such using a subsequent step in the building process.
For instance (there are more options as second step to choose from):
fun <K, V> pairs(pair: Pair<K, V>, vararg otherPairs: Pair<K, V>) {
mapArguments(pair, otherPairs).toExpect<Map.Entry<K, V>> { isKeyValue(it) }
}
inline fun <T, reified R> mapArguments(first: T, others: Array<out T>, mapper: (T) -> R): Pair<R, Array<out R>>
(source)inline fun <reified R> mapArguments(first: Byte, others: ByteArray, mapper: (Byte) -> R): Pair<R, Array<out R>>
(source)inline fun <reified R> mapArguments(first: Char, others: CharArray, mapper: (Char) -> R): Pair<R, Array<out R>>
(source)inline fun <reified R> mapArguments(first: Short, others: ShortArray, mapper: (Short) -> R): Pair<R, Array<out R>>
(source)inline fun <reified R> mapArguments(first: Int, others: IntArray, mapper: (Int) -> R): Pair<R, Array<out R>>
(source)inline fun <reified R> mapArguments(first: Long, others: LongArray, mapper: (Long) -> R): Pair<R, Array<out R>>
(source)inline fun <reified R> mapArguments(first: Float, others: FloatArray, mapper: (Float) -> R): Pair<R, Array<out R>>
(source)inline fun <reified R> mapArguments(first: Double, others: DoubleArray, mapper: (Double) -> R): Pair<R, Array<out R>>
(source)inline fun <reified R> mapArguments(first: Boolean, others: BooleanArray, mapper: (Boolean) -> R): Pair<R, Array<out R>>
(source)
Maps the given first and others to the given type R with the help of the given mapper.
Use the overload without mapper
in case you want to map to an lambda with an Expect receiver
and use one of the available options as second step. For instance, mapArguments(a, aX).toExpect<String> { ... }
fun mapArguments(first: Byte, others: ByteArray): ArgumentMapperBuilder<Byte>
(source)fun mapArguments(first: Char, others: CharArray): ArgumentMapperBuilder<Char>
(source)fun mapArguments(first: Short, others: ShortArray): ArgumentMapperBuilder<Short>
(source)fun mapArguments(first: Int, others: IntArray): ArgumentMapperBuilder<Int>
(source)fun mapArguments(first: Long, others: LongArray): ArgumentMapperBuilder<Long>
(source)fun mapArguments(first: Float, others: FloatArray): ArgumentMapperBuilder<Float>
(source)fun mapArguments(first: Double, others: DoubleArray): ArgumentMapperBuilder<Double>
(source)fun mapArguments(first: Boolean, others: BooleanArray): ArgumentMapperBuilder<Boolean>
(source)
Creates a ArgumentMapperBuilder with the given first and others as arguments; specify the mapping as such using a subsequent step in the building process.