FreeRDP
Loading...
Searching...
No Matches
OrderedDictionary Class Reference
Inheritance diagram for OrderedDictionary:
Collaboration diagram for OrderedDictionary:

Instance Methods

(void) - insertObject:forKey:atIndex:
 
(id) - keyAtIndex:
 
(NSUInteger) - indexForValue:
 
(NSUInteger) - indexForKey:
 
(NSEnumerator *) - reverseKeyEnumerator
 

Protected Attributes

NSMutableDictionary * dictionary
 
NSMutableArray * array
 

Detailed Description

Definition at line 28 of file OrderedDictionary.h.

Method Documentation

◆ indexForKey:

- (NSUInteger) indexForKey: (id)  key

Definition at line 28 of file OrderedDictionary.m.

136 :(id)key
137{
138 return [array indexOfObject:key];
139}

◆ indexForValue:

- (NSUInteger) indexForValue: (id)  value

Definition at line 28 of file OrderedDictionary.m.

141 :(id)value
142{
143 NSArray *keys = [self allKeysForObject:value];
144 if ([keys count] > 0)
145 {
146 return [self indexForKey:[keys objectAtIndex:0]];
147 }
148
149 return NSNotFound;
150}

◆ insertObject:forKey:atIndex:

- (void) insertObject: (id)  anObject
forKey: (id)  aKey
atIndex: (NSUInteger)  anIndex 

Definition at line 28 of file OrderedDictionary.m.

121 :(id)anObject forKey:(id)aKey atIndex:(NSUInteger)anIndex
122{
123 if ([dictionary objectForKey:aKey])
124 {
125 [self removeObjectForKey:aKey];
126 }
127 [array insertObject:aKey atIndex:anIndex];
128 [dictionary setObject:anObject forKey:aKey];
129}

◆ keyAtIndex:

- (id) keyAtIndex: (NSUInteger)  anIndex

Definition at line 28 of file OrderedDictionary.m.

131 :(NSUInteger)anIndex
132{
133 return [array objectAtIndex:anIndex];
134}

◆ reverseKeyEnumerator

- (NSEnumerator *) reverseKeyEnumerator

Definition at line 28 of file OrderedDictionary.m.

117{
118 return [array reverseObjectEnumerator];
119}

Field Documentation

◆ array

- (NSMutableArray*) array
protected

Definition at line 31 of file OrderedDictionary.h.

◆ dictionary

- (NSMutableDictionary*) dictionary
protected

Definition at line 30 of file OrderedDictionary.h.


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