forked from pmougin/F-Script
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathFSArray.h
72 lines (61 loc) · 2.39 KB
/
FSArray.h
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/* FSArray.h Copyright (c) 1998-2009 Philippe Mougin. */
/* This software is open source. See the license. */
#import <Foundation/Foundation.h>
#import "FSNSObject.h"
#import "FSNSArray.h"
#import "FSNSMutableArray.h"
@class FSBlock, FSSystem;
enum ArrayRepType {FS_ID, DOUBLE, EMPTY, BOOLEAN, FETCH_REQUEST};
@interface FSArray: NSMutableArray
{
NSUInteger retainCount;
enum ArrayRepType type;
id rep; // internal representation
}
///////////////////////////////////// USER METHODS
- (id)at:(id)index put:(id)elem;
- (FSArray *)distinctId;
- (BOOL)isEqual:(id)anObject;
- (FSArray *)replicate:(NSArray *)operand;
- (FSArray *)reverse;
- (FSArray *)rotatedBy:(NSNumber *)operand;
- (FSArray *)sort;
///////////////////////////////////// OTHER METHODS
+ (double) maxCount;
+ (id)arrayWithObject:(id)anObject;
+ (id)arrayWithObjects:(id *)objects count:(NSUInteger)count;
- (void)addObject:(id)anObject;
- (NSArray *)arrayByAddingObject:(id)anObject;
- (NSArray *)arrayByAddingObjectsFromArray:(NSArray *)otherArray;
- (NSString *)componentsJoinedByString:(NSString *)separator;
- (BOOL)containsObject:(id)anObject;
- (id)copyWithZone:(NSZone *)zone;
- (NSUInteger)count;
- (void)dealloc;
- (NSString *)description;
- (NSString *)descriptionWithLocale:(NSDictionary *)locale;
- (NSString *)descriptionWithLocale:(NSDictionary *)locale indent:(NSUInteger)level;
- (id)firstObjectCommonWithArray:(NSArray *)otherArray;
- (NSUInteger)indexOfObject:(id)anObject;
- (NSUInteger)indexOfObject:(id)anObject inRange:(NSRange)range;
- (NSUInteger)indexOfObjectIdenticalTo:(id)anObject;
- (NSUInteger)indexOfObjectIdenticalTo:(id)anObject inRange:(NSRange)range;
- (id)init;
- (id)initWithCapacity:(NSUInteger)aNumItems; // designated initializer
- (id)initWithObject:(id)object;
- (id)initWithObjects:(id *)objects count:(NSUInteger)nb;
- (void)insertObject:anObject atIndex:(NSUInteger)index;
- (BOOL)isEqualToArray:(NSArray *)anArray;
- (id)mutableCopyWithZone:(NSZone *)zone;
- (id)objectAtIndex:(NSUInteger)index;
- (NSEnumerator *)objectEnumerator;
- (void)removeLastObject;
- (void)removeObjectAtIndex:(NSUInteger)index;
- (void)replaceObjectAtIndex:(NSUInteger)index withObject:(id)anObject;
- (id)retain;
- (NSUInteger)retainCount;
- (void)release;
- (NSEnumerator *)reverseObjectEnumerator;
- (void)setArray:(NSArray *)operand;
- (NSArray *)subarrayWithRange:(NSRange)range; // returns an instance of FSArray.
@end