-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCDZDictionaryArray.h
More file actions
48 lines (37 loc) · 1.26 KB
/
CDZDictionaryArray.h
File metadata and controls
48 lines (37 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// CDZDictionaryArray.h
//
//
// Created by zhengchen2 on 14-9-5.
// Copyright (c) 2014年 zhengchen2 All rights reserved.
//
#import <Foundation/Foundation.h>
@interface CDZDictionaryArray : NSObject <NSFastEnumeration>{
NSMutableArray* _array;
NSMutableArray* _keyArray;
NSMutableDictionary* _dictionary;
}
- (id)initWithCapacity:(NSUInteger)numItems;
- (NSMutableArray*)mutableArray;
- (NSMutableDictionary*)mutableDictionary;
- (void)addObject:(id)anObject forKey:(id<NSCopying>)aKey;
- (void)insertObject:(id)anObject atIndex:(NSUInteger)index forKey:(id<NSCopying>)aKey;
- (void)removeObject:(id)anObject;
- (BOOL)containsObject:(id)anObject;
- (BOOL)containsObjectForKey:(id)aKey;
// 存在aKey,则进行替换,不存在则进行简单添加
- (void)replaceObjectForKey:(id)aKey withObject:(id)anObject;
- (NSInteger)count;
- (NSInteger)indexOfObject:(id)anObject;
- (NSInteger)indexForKey:(id)aKey;
- (id)firstObject;
- (id)lastObject;
- (id)objectAtIndex:(NSUInteger)index;
- (id)objectForKey:(id)aKey;
// 获取 anObject 的 key
- (id)keyOfObject:(id)anObject;
- (void)removeAllObjects;
- (void)removeObjectForKey:(id)aKey;
- (void)removeLastObject;
- (void)enumerateUsingBlock:(void (^)(id key, id obj, NSUInteger idx,BOOL *stop))block;
@end