toNotEmptySet

@SinceKotoolsTypes(version = "4.0")
fun <E> Collection<E>.toNotEmptySet(): Result<NotEmptySet<E>>

Returns a NotEmptySet containing all the elements of this collection, or returns an IllegalArgumentException if this collection is empty.