add

open fun add(element: E): Boolean

Adds the given element to this queue. If the queue is full, the least recently added element is discarded so that a new element can be inserted.

Return

true, always

Parameters

element

the element to add

Throws

if the given element is null