flushToArray

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

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

Example

queue.flushToArray(::Array)

Return

The array containing the former contents 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.