OOOrderedDictionary Class Reference

OOOrderedDictionary. More...

#import "OOOrderedDictionary.h"

+ Inheritance diagram for OOOrderedDictionary:

Instance Methods

(id) - initWithKeySelector:
 Initialize a OOOrderedDictionary. More...
 
(id) - initWithCapacity:
 Initialize a OOOrderedDictionary. More...
 
(id) - initWithCapacity:keySelector:
 Initialize a OOOrderedDictionary. More...
 
(void) - setObject:forKey:
 Add an object to the OOOrderedDictionary. More...
 
(void) - addObject:
 Add an object to the OOOrderedDictionary using OOOrderedDictionary.keySelector. More...
 
(id) - objectForKey:
 Get the object associated with the key specified. More...
 
(NSInteger) - indexForKey:
 Get the index for the object associated with the key specified. More...
 
(NSInteger) - indexForValue:
 Get the index for the object specified. More...
 
(id) - objectAtIndex:
 Get the object at the index specified. More...
 
(void) - removeObject:
 Remove all occurrences in the array of a given object. More...
 
(void) - removeObjectAtIndex:
 Removes the object at index. More...
 
(void) - removeObjectIdenticalTo:
 Removes all occurrences of a given object in the array. More...
 
(void) - sortUsingSelector:
 Sort the array’s elements in ascending order, as determined by the comparison method specified by a given selector. More...
 
(void) - sortWithOptions:usingComparator:
 Sort the array using the specified options and the comparison method specified by a given NSComparator Block. More...
 
(NSUInteger) - count
 Get the number of objects in the OOOrderedDictionary. More...
 
(NSArray *) - objectsInRange:
 Get an ordered array of object in the given range. More...
 
(NSArray *) - keysInRange:
 Get an ordered array of keys in the given range. More...
 
(NSUInteger) - countByEnumeratingWithState:objects:count:
 

Detailed Description

Method Documentation

- (void) addObject: (id)  obj

Add an object to the OOOrderedDictionary using OOOrderedDictionary.keySelector.

Parameters
[in]objthe object to add
- (NSUInteger) count

Get the number of objects in the OOOrderedDictionary.

Returns
the number of object in the OOOrderedDictionary
- (NSUInteger) countByEnumeratingWithState: (NSFastEnumerationState *)  state
objects: (__unsafe_unretained id *)  stackbuf
count: (NSUInteger)  len 
- (NSInteger) indexForKey: (id)  key

Get the index for the object associated with the key specified.

Parameters
[in]keythe key for the object
Returns
the index for the object associated with key
- (NSInteger) indexForValue: (id)  value

Get the index for the object specified.

Parameters
[in]valuethe object to get the index for
Returns
the index for the object
- (id) initWithCapacity: (NSUInteger)  numItems

Initialize a OOOrderedDictionary.

Parameters
[in]numItemsthe initial capacity of the OOOrderedDictionary (not count, just capacity)
Returns
the initialized OOOrderedDictionary
- (id) initWithCapacity: (NSUInteger)  numItems
keySelector: (SEL)  keySelector 

Initialize a OOOrderedDictionary.

Parameters
[in]numItemsthe initial capacity of the OOOrderedDictionary (not count, just capacity)
[in]keySelectorthe selector to use to fetch the key from objects added (using OrderedDicitonary.addObject:)
Returns
the initialized OOOrderedDictionary
- (id) initWithKeySelector: (SEL)  keySelector

Initialize a OOOrderedDictionary.

Parameters
[in]keySelectorthe selector to use to fetch the key from objects added (using OrderedDicitonary.addObject:)
Returns
the initialized OOOrderedDictionary
- (NSArray *) keysInRange: (NSRange)  range

Get an ordered array of keys in the given range.

Parameters
[in]rangethe range of keys to get
Returns
an NSArray with the keys within the range
- (id) objectAtIndex: (NSInteger)  index

Get the object at the index specified.

Parameters
[in]indexthe index of the object to fetch
Returns
the object at index
- (id) objectForKey: (id)  key

Get the object associated with the key specified.

Parameters
[in]keythe key for the object
Returns
the object associated with key
- (NSArray *) objectsInRange: (NSRange)  range

Get an ordered array of object in the given range.

Parameters
[in]rangethe range of objects to get
Returns
an NSArray with the objects within the range
- (void) removeObject: (id)  obj

Remove all occurrences in the array of a given object.

Parameters
[in]objThe object to remove from the array
- (void) removeObjectAtIndex: (NSInteger)  index

Removes the object at index.

Parameters
[in]indexThe index from which to remove the object in the array. The value must not exceed the bounds of the array.
- (void) removeObjectIdenticalTo: (id)  obj

Removes all occurrences of a given object in the array.

Parameters
[in]objThe object to remove from the array
- (void) setObject: (id)  obj
forKey: (id)  key 

Add an object to the OOOrderedDictionary.

Parameters
[in]objthe object to add
[in]keythe key for the object
- (void) sortUsingSelector: (SEL)  comparator

Sort the array’s elements in ascending order, as determined by the comparison method specified by a given selector.

Parameters
[in]comparatorA selector that specifies the comparison method to use to compare elements in the array
The comparator message is sent to each object in the array and has as its single argument another object in the array. The comparator method should return NSOrderedAscending if the array is smaller than the argument, NSOrderedDescending if the array is larger than the argument, and NSOrderedSame if they are equal.
- (void) sortWithOptions: (NSSortOptions)  opts
usingComparator: (NSComparator)  cmptr 

Sort the array using the specified options and the comparison method specified by a given NSComparator Block.

Parameters
[in]optsA bitmask that specifies the options for the sort (whether it should be performed concurrently and whether it should be performed stably)
[in]cmptrA comparator block

The documentation for this class was generated from the following file: