Up

NSArray+GNUstepBase documentation

Authors

Richard Frith-Macdonald (rfm@gnu.org)

Copyright: (C) 2003-2010 Free Software Foundation, Inc.

Software documentation for the NSArray(GNUstepBase) category

NSArray(GNUstepBase)

Declared in:
GNUstepBase/NSArray+GNUstepBase.h
Availability: Not in OpenStep/MacOS-X

Description forthcoming.
Method summary

insertionPosition: usingFunction: context: 

- (NSUInteger) insertionPosition: (id)item usingFunction: (NSComparisonResult(*)(id,id,void*))sorter context: (void*)context;
Availability: Not in OpenStep/MacOS-X

Method for working with sorted arrays - use a binary chop to determine the insertion location for an object. If equal objects already exist in the array, they will be located immediately before the insertion position.

The comparator function takes two items as arguments, the first is the item to be added, the second is the item already in the array. The function should return NSOrderedAscending if the item to be added is 'less than' the item in the array, NSOrderedDescending if it is greater, and NSOrderedSame if it is equal.


insertionPosition: usingSelector: 

- (NSUInteger) insertionPosition: (id)item usingSelector: (SEL)comp;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.


Up