~ubuntu-branches/ubuntu/trusty/gnustep-base/trusty

« back to all changes in this revision

Viewing changes to Headers/Foundation/NSSet.h

Tags: upstream-1.20.0
ImportĀ upstreamĀ versionĀ 1.20.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
#import <GNUstepBase/GSVersionMacros.h>
32
32
 
33
33
#import <Foundation/NSObject.h>
 
34
#import <Foundation/NSEnumerator.h>
34
35
 
35
36
#if     defined(__cplusplus)
36
37
extern "C" {
38
39
 
39
40
@class NSArray, NSString, NSEnumerator, NSDictionary;
40
41
 
41
 
@interface NSSet : NSObject <NSCoding, NSCopying, NSMutableCopying>
 
42
@interface NSSet : NSObject <NSCoding, NSCopying, NSMutableCopying, NSFastEnumeration>
42
43
 
43
44
+ (id) set;
44
45
+ (id) setWithArray: (NSArray*)objects;
46
47
+ (id) setWithObjects: (id)firstObject, ...;
47
48
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
48
49
+ (id) setWithObjects: (id*)objects
49
 
                count: (unsigned)count;
 
50
                count: (NSUInteger)count;
50
51
#endif
51
52
+ (id) setWithSet: (NSSet*)aSet;
52
53
 
53
54
- (NSArray*) allObjects;
54
55
- (id) anyObject;
55
56
- (BOOL) containsObject: (id)anObject;
56
 
- (unsigned) count;
 
57
- (NSUInteger) count;
57
58
- (NSString*) description;
58
59
- (NSString*) descriptionWithLocale: (NSDictionary*)locale;
59
60
 
61
62
- (id) initWithArray: (NSArray*)other;
62
63
- (id) initWithObjects: (id)firstObject, ...;
63
64
- (id) initWithObjects: (id*)objects
64
 
                 count: (unsigned)count;
 
65
                 count: (NSUInteger)count;
65
66
- (id) initWithSet: (NSSet*)other;
66
67
- (id) initWithSet: (NSSet*)other copyItems: (BOOL)flag;
67
68
 
87
88
 
88
89
@interface NSMutableSet: NSSet
89
90
 
90
 
+ (id) setWithCapacity: (unsigned)numItems;
 
91
+ (id) setWithCapacity: (NSUInteger)numItems;
91
92
 
92
93
- (void) addObject: (id)anObject;
93
94
- (void) addObjectsFromArray: (NSArray*)array;
94
 
- (id) initWithCapacity: (unsigned)numItems;
 
95
- (id) initWithCapacity: (NSUInteger)numItems;
95
96
- (void) intersectSet: (NSSet*)other;
96
97
- (void) minusSet: (NSSet*)other;
97
98
- (void) removeAllObjects;
104
105
 
105
106
@interface NSCountedSet : NSMutableSet
106
107
 
107
 
- (unsigned int) countForObject: (id)anObject;
 
108
- (NSUInteger) countForObject: (id)anObject;
108
109
 
109
110
@end
110
111
 
125
126
 *   been added once - and are therefore simply wasting space.
126
127
 * </p>
127
128
 */
128
 
- (void) purge: (int)level;
 
129
- (void) purge: (NSInteger)level;
129
130
 
130
131
/**
131
132
 * <p>
175
176
 * set by removing any objec whose count is less than or equal to that given.
176
177
 *
177
178
 */
178
 
void    GSUPurge(unsigned count);
 
179
void    GSUPurge(NSUInteger count);
179
180
 
180
181
/*
181
182
 * GSUSet() can be used to artificially set the count for a particular object
182
183
 * Setting the count to zero will remove the object from the global set.
183
184
 */
184
 
id      GSUSet(id anObject, unsigned count);
 
185
id      GSUSet(id anObject, NSUInteger count);
185
186
 
186
187
#endif  /* GS_API_NONE */
187
188