Instance Property

count

The number of elements in the set.

Declaration

var count: Int { get }

Discussion

Complexity: O(1).

Relationships

From Protocol

See Also

Inspecting a Set

var isEmpty: Bool

A Boolean value that indicates whether the set is empty.

var capacity: Int

The total number of elements that the set can contain without allocating new storage.