(Preliminary Documentation) Copyright ã1994 by NeXT Computer, Inc.  All Rights Reserved.

NSMutableArray 

Inherits From:	NSArray : NSObject

Conforms To:	NSCoding
NSCopying  
NSMutableCopying 
NSObject

Declared In:	foundation/NSArray.h 

Allocating and Initializing an NSMutableArray

+ allocWithZone:(NSZone *)zone	Creates and returns an uninitialized array object in zone.
+ arrayWithCapacity:(unsigned)aNumItems	Creates and returns an array object, giving it enough allocated memory to hold numItems objects.
- initWithCapacity:(unsigned)aNumItems	Initializes a newly allocated array object, giving it enough memory to hold numItems objects.

Adding Objects	

- (void)addObject:object	Inserts anObject at the end of the array.
- (void)addObjectsFromArray:(NSArray *)anotherArray
	Adds the objects contained in anotherArray to the end of the receiver's array.
- (void)insertObject:anObject	Inserts anObject into the array at index.
atIndex:(unsigned)index	

Removing Objects

- (void)removeAllObjects	Empties the array of all its elements.
- (void)removeLastObject	Removes the last object in the array and sends it a release message.
- (void)removeObject:anObject	Removes all occurrences of anObject.  isEqual: is used to test for anObject.
- (void)removeObjectAtIndex:(unsigned)index	Removes the object at index and moves all elements beyond index up one slot to fill the gap.
- (void)removeObjectIdenticalTo:anObject	Removes all elements having the same id as anObject.
- (void)removeObjectsFromIndices:(unsigned *)indices	
numIndices:(unsigned int)count	Removes objects at the positions specified in the indices array, which has count elements.  This method is provided for efficiency reasons; it will not work in a distributed object environment.  
- (void)removeObjectsInArray:(NSArray *)otherArray
	Removes from the receiver the objects found in otherArray.

Replacing Objects

- (void)replaceObjectAtIndex:(unsigned)index	Replaces the object at index with anObject.  
withObject:anObject	
- (void)setArray:(NSArray *)otherArray	Sets the contents of the receiver to the elements in otherArray

Sorting Elements

- (void)sortUsingFunction:(int (*)(id element1,id element2,void *userData))comparator
context:(void *)context	Sorts the receiver's elements in ascending order as defined by the comparison function comparator.  context is passed as the function's third argument.
- (void)sortUsingSelector:(SEL)comparator	Sorts the receiver's elements in ascending order as defined by the comparison method comparator.