add

suspend fun add(element: T): Boolean

Adds an element to the set.

This method adds the specified element to the set in a thread-safe approach.

Return

true if the element was added successfully, false if it already exists in the set.

Parameters

element

The element to be added.