Release 2.1  Copyright ã1993-1994 by Lighthouse Design, Ltd.  All Rights Reserved.

FCUnorderedCollection

Inherits From:	FCCollection : Object 

Declared In:	FCUnorderedCollection.h 

Class Description 

FCUnorderedCollection is a subclass of FCCollection that implements the behavior of an unordered collection.  "Order" is defined as each object in the collection having a unique index with which it can be accessed. 

All collection subclasses which require an unordered collection are subclasses of this class. This includes sets and bags. 

You may loop through all the objects in an unordered collection by using the FOR_EACH() family of macros, declared in FCCollection.  Unlike an ordered collection, this is the only way to step through all the objects. All other interaction with an unordered collection requires you to refer to objects by their id , rather than by their positions in the collection. 

FCUnorderedCollection uses a HashTable object as its object storage medium, and thus is fairly fast at adding and removing objects and determining if an object is a member of the collection.  See the class documentation on HashTable for more information. 

FCUnorderedCollection is an abstract superclass.  You cannot instantiate it directly; in fact, some of its methods are simply stubs in the superclass and return errors when invoked.  Its basic purpose is to provide common methods and an orthogonal interface to its two instantiable subclasses, both of which fully adhere to the interface described here. 

FCUnorderedCollection inherits from FCCollection.  The interface documented here only covers the methods that are new or different in FCUnorderedCollection, but all the methods in FCCollection will work on an FCUnorderedCollection as well.  Refer to the documentation on FCCollection to complete the description of an FCUnorderedCollection. 

Instance Variables 

Inherited from Object 
None declared in this class. 

Inherited from FCCollection 
id _fc_contents ; 
Class _fc_class ; 
SEL _fc_sortSelector ; 
BOOL _fc_archiveByReference ; 

Declared in FCUnorderedCollection 
None declared in this class. 

Method Types 

Creating a new instance	+alloc 
+allocFromZone: 

Accessing the Behavior of the Collection	
	-isOrdered 

Class Methods 

alloc 
+ alloc;
 
This method cannot be used to create an FCUnorderedCollection object. FCUnorderedCollection is an abstract superclass, you should call alloc only on its instantiable subclasses. The method is implemented only to prevent you from using it; if you do use it, it generates an error message. 

allocFromZone: 
+ allocFromZone:(NXZone *)zone;
 
This method cannot be used to create an FCUnorderedCollection object. FCUnorderedCollection is an abstract superclass, you should call allocFromZone: only on its instantiable subclasses. The method is implemented only to prevent you from using it; if you do use it, it generates an error message. 

Instance Methods 

isOrdered 
- (BOOL)isOrdered;
 
Returns NO to indicate that, unlike FCCollection, this class and its subclasses maintain no ordering of objects. 

See also:   - isOrdered  (FCCollection)