Instance Method

count(for:)

Returns the count associated with a given object in the set.

Declaration

func count(for object: Any) -> Int

Parameters

anObject

The object for which to return the count.

Return Value

The count associated with anObject in the set, which can be thought of as the number of occurrences of anObject present in the set.

See Also

Examining a Counted Set

func objectEnumerator() -> NSEnumerator

Returns an enumerator object that lets you access each object in the set once, independent of its count.