Instance Method

initWithCapacity:

Returns an initialized mutable ordered set with a given initial capacity.

Declaration

- (instancetype)initWithCapacity:(NSUInteger)numItems;

Parameters

numItems

The initial capacity of the new ordered set.

Return Value

An initialized mutable ordered set with initial capacity to hold numItems members.

Discussion

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

This method is a designated initializer of NSMutableOrderedSet.

See Also

Creating a Mutable Ordered Set

+ orderedSetWithCapacity:

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

- init

Initializes a newly allocated mutable ordered set.