copyToArray

fun copyToArray(provider: (size: Int, init: (Int) -> T) -> Array<T>): Array<T>

Copies the contents of this Queue into an array constructed by the given provider.

Example

queue.copyToArray(::Array)

Return

The array copy of this Queue.

Parameters

provider

Array instance provider that will be called once to get an instance of an array of type T of size size.