Instance Method

add(_:)

Adds a given object to the set.

Declaration

func add(_ object: Any)

Parameters

anObject

The object to add to the set.

Discussion

If anObject is already a member, add(_:) increments the count associated with the object. If anObject is not already a member, it is sent a retain message.

See Also

Adding and Removing Entries

func remove(Any)

Removes a given object from the set.