NotEmptyCollection

@Since(version = KotoolsTypesVersion.V4_1_0)
interface NotEmptyCollection<out E>

Represents a collection that has at least one element of type E.

Inheritors

Properties

Link copied to clipboard
abstract val head: E

The first element of this collection.

Link copied to clipboard

The size of this collection.

Link copied to clipboard
@Since(version = KotoolsTypesVersion.V4_1_0)
val NotEmptyCollection<*>?.sizeOrZero: PositiveInt

Returns the size of this collection, or returns ZeroInt if this collection is null.

Link copied to clipboard

All elements of this collection except the first one.

Functions

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

Returns the string representation of this collection.