pushNth

fun pushNth(data: <Error class: unknown class>? = null, n: <Error class: unknown class>)

Inserts a new element into @queue at the given position.

Since

2.4

Parameters

data

the data for the new element

n

the position to insert the new element. If @n is negative or larger than the number of elements in the @queue, the element is added to the end of the queue.