singletonSet

fun <T> T.singletonSet(): Set<T>(source)

Wraps a given item in a set.

This is a functional style shorthand for setOf(this), allowing a simpler syntax for creating a set from a single item.

Receiver

The item to be wrapped in a set.

Return

A set containing only the receiver item.

Since

0.12.0