toTypedArray

Returns a typed object array containing all of the elements of this primitive array.

Since Kotlin

1.3

Returns a typed object array containing all of the elements of this primitive array.

Since Kotlin

1.0

expect inline fun <T> Collection<T>.toTypedArray(): Array<T>(source)

Returns a typed array containing all the elements of this collection.

Allocates an array of runtime type T having its size equal to the size of this collection and populates the array with the elements of this collection.

Since Kotlin

1.0

Samples

Returns a typed object array containing all of the elements of this primitive array.

Since Kotlin

1.1

actual inline fun <T> Collection<T>.toTypedArray(): Array<T>(source)

Returns a typed array containing all the elements of this collection.

Allocates an array of runtime type T having its size equal to the size of this collection and populates the array with the elements of this collection.

Since Kotlin

1.1

Samples

Returns a typed object array containing all of the elements of this primitive array.

Since Kotlin

1.0

actual inline fun <T> Collection<T>.toTypedArray(): Array<T>(source)

Returns a typed array containing all the elements of this collection.

Allocates an array of runtime type T having its size equal to the size of this collection and populates the array with the elements of this collection.

Since Kotlin

1.0

Samples

Returns a typed object array containing all of the elements of this primitive array.

Since Kotlin

1.3

actual inline fun <T> Collection<T>.toTypedArray(): Array<T>(source)

Returns a typed array containing all the elements of this collection.

Allocates an array of runtime type T having its size equal to the size of this collection and populates the array with the elements of this collection.

Since Kotlin

1.3

Samples

Returns a typed object array containing all of the elements of this primitive array.

Since Kotlin

1.8

actual inline fun <T> Collection<T>.toTypedArray(): Array<T>(source)

Returns a typed array containing all the elements of this collection.

Allocates an array of runtime type T having its size equal to the size of this collection and populates the array with the elements of this collection.

Since Kotlin

1.8

Samples

Returns a typed object array containing all of the elements of this primitive array.

Since Kotlin

1.8

actual inline fun <T> Collection<T>.toTypedArray(): Array<T>(source)

Returns a typed array containing all the elements of this collection.

Allocates an array of runtime type T having its size equal to the size of this collection and populates the array with the elements of this collection.

Since Kotlin

1.8

Samples