Initializer

init(set:)

Initializes a newly allocated set and adds to it objects from another given set.

Declaration

convenience init(set: Set<AnyHashable>)

Parameters

set

A set containing objects to add to the receiving set. Each object is retained as it is added.

Return Value

An initialized objects set containing the objects from set. The returned set might be different than the original receiver.

See Also

Initializing a Set

init(array: [Any])

Initializes a newly allocated set with the objects that are contained in a given array.

init(objects: UnsafePointer<AnyObject>?, count: Int)

Initializes a newly allocated set with a specified number of objects from a given C array of objects.

init(set: Set<AnyHashable>, copyItems: Bool)

Initializes a newly allocated set and adds to it members of another given set.

init()

Initializes a newly allocated set.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software