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.

This function is intended for API functions which expect x: T, vararg otherX: T and want to pass the arguments to another function which expects only one argument of List<T>.

Return

a List containing arg and otherArgs.


fun varargToList(arg: Boolean, otherArgs: BooleanArray): List<Boolean>

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

This function is intended for API functions which expect x: Boolean, vararg otherX: Boolean and want to pass the arguments to another function which expects only one argument of List<Boolean>.

Return

a List containing arg and otherArgs.

Since

3.1.0


fun varargToList(arg: Byte, otherArgs: ByteArray): List<Byte>

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

This function is intended for API functions which expect x: Byte, vararg otherX: Byte and want to pass the arguments to another function which expects only one argument of List<Byte>.

Return

a List containing arg and otherArgs.

Since

3.1.0


fun varargToList(arg: Char, otherArgs: CharArray): List<Char>

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

This function is intended for API functions which expect x: Char, vararg otherX: Char and want to pass the arguments to another function which expects only one argument of List<Char>.

Return

a List containing arg and otherArgs.

Since

3.1.0


fun varargToList(arg: Short, otherArgs: ShortArray): List<Short>

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

This function is intended for API functions which expect x: Short, vararg otherX: Short and want to pass the arguments to another function which expects only one argument of List<Short>.

Return

a List containing arg and otherArgs.

Since

3.1.0


fun varargToList(arg: Int, otherArgs: IntArray): List<Int>

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

This function is intended for API functions which expect x: Int, vararg otherX: Int and want to pass the arguments to another function which expects only one argument of List<Int>.

Return

a List containing arg and otherArgs.

Since

3.1.0


fun varargToList(arg: Long, otherArgs: LongArray): List<Long>

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

This function is intended for API functions which expect x: Long, vararg otherX: Long and want to pass the arguments to another function which expects only one argument of List<Long>.

Return

a List containing arg and otherArgs.

Since

3.1.0


fun varargToList(arg: Float, otherArgs: FloatArray): List<Float>

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

This function is intended for API functions which expect x: Float, vararg otherX: Float and want to pass the arguments to another function which expects only one argument of List<Float>.

Return

a List containing arg and otherArgs.

Since

3.1.0


fun varargToList(arg: Double, otherArgs: DoubleArray): List<Double>

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

This function is intended for API functions which expect x: Double, vararg otherX: Double and want to pass the arguments to another function which expects only one argument of List<Double>.

Return

a List containing arg and otherArgs.

Since

3.1.0