Type Method

setWithCapacity:

Creates and returns a mutable set with a given initial capacity.

Declaration

+ (instancetype)setWithCapacity:(NSUInteger)numItems;

Parameters

numItems

The initial capacity of the new set.

Return Value

A mutable set with initial capacity to hold numItems members.

Discussion

Mutable sets allocate additional memory as needed, so numItems simply establishes the object’s initial capacity.

See Also

Creating a mutable set

- initWithCapacity:

Returns an initialized mutable set with a given initial capacity.

- init

Initializes a newly allocated set.