NotEmptySet

@Serializable(with = NotEmptySetSerializer::class)
@SinceKotoolsTypes(version = "4.0")
data class NotEmptySet<out E>

Representation of sets that contain at least one element of type E.

Functions

Link copied to clipboard
fun toSet(): Set<E>

Returns all elements of this set as a Set of type E.

Link copied to clipboard
open override fun toString(): String

Returns the string representation of this set.

Properties

Link copied to clipboard
val head: E

The first element of this set.

Link copied to clipboard

The size of this set.

Link copied to clipboard
val tail: NotEmptySet<E>? = null

All elements of this set except the first one.