Collection

A collection is a Foundation framework object whose primary role is to store objects in the form of arrays, dictionaries, and sets.

Collection Classes

The primary classes—NSArray, NSSet, and NSDictionary—share a number of features in common:

Cocoa also provides three classes—NSPointerArray, NSHashTable, and NSMapTable—that are modeled on these classes but that differ in the following ways:

Since a Cocoa collection object can hold any sort of object (unlike collections in some other environments), you typically don’t create special collection classes to contain objects of a particular type.

Ordering Schemes

Collections store and vend other objects in a particular ordering scheme:

Definitive Discussion

Prerequisite Articles

    (None)

Related Articles

Did this document help you? Yes It's good, but... Not helpful...


Last updated: 2010-08-03