mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Annotated various methods with generics
This commit is contained in:
parent
20152fc291
commit
829a39663c
4 changed files with 13 additions and 13 deletions
|
@ -155,8 +155,8 @@ GS_EXPORT_CLASS
|
|||
- (NSString *) descriptionWithLocale: (NSLocale *)locale indent: (BOOL)flag;
|
||||
|
||||
// Convert to other types
|
||||
- (NSArray *) array;
|
||||
- (NSSet *) set;
|
||||
- (GS_GENERIC_CLASS(NSArray, ElementT) *) array;
|
||||
- (GS_GENERIC_CLASS(NSSet, ElementT) *) set;
|
||||
@end
|
||||
|
||||
// Mutable Ordered Set
|
||||
|
|
|
@ -65,11 +65,11 @@ GS_EXPORT_CLASS
|
|||
#endif
|
||||
@end
|
||||
|
||||
@interface NSArray (NSPredicate)
|
||||
@interface GS_GENERIC_CLASS(NSArray, ElementT) (NSPredicate)
|
||||
/** Evaluate each object in the array using the specified predicate and
|
||||
* return an array containing all the objects which evaluate to YES.
|
||||
*/
|
||||
- (NSArray *) filteredArrayUsingPredicate: (NSPredicate *)predicate;
|
||||
- (GS_GENERIC_CLASS(NSArray, ElementT) *) filteredArrayUsingPredicate: (NSPredicate *)predicate;
|
||||
@end
|
||||
|
||||
@interface NSMutableArray (NSPredicate)
|
||||
|
@ -79,11 +79,11 @@ GS_EXPORT_CLASS
|
|||
- (void) filterUsingPredicate: (NSPredicate *)predicate;
|
||||
@end
|
||||
|
||||
@interface NSSet (NSPredicate)
|
||||
@interface GS_GENERIC_CLASS(NSSet, ElementT) (NSPredicate)
|
||||
/** Evaluate each object in the set using the specified predicate and
|
||||
* return an set containing all the objects which evaluate to YES.
|
||||
*/
|
||||
- (NSSet *) filteredSetUsingPredicate: (NSPredicate *)predicate;
|
||||
- (GS_GENERIC_CLASS(NSSet, ElementT) *) filteredSetUsingPredicate: (NSPredicate *)predicate;
|
||||
@end
|
||||
|
||||
@interface NSMutableSet (NSPredicate)
|
||||
|
|
|
@ -143,13 +143,13 @@ GS_EXPORT_CLASS
|
|||
- (id) reversedSortDescriptor;
|
||||
@end
|
||||
|
||||
@interface NSArray (NSSortDescriptorSorting)
|
||||
@interface GS_GENERIC_CLASS(NSArray, ElementT) (NSSortDescriptorSorting)
|
||||
|
||||
/**
|
||||
* Produces a sorted array using the mechanism described for
|
||||
* [NSMutableArray-sortUsingDescriptors:]
|
||||
*/
|
||||
- (NSArray *) sortedArrayUsingDescriptors: (NSArray *)sortDescriptors;
|
||||
- (GS_GENERIC_CLASS(NSArray, ElementT) *) sortedArrayUsingDescriptors: (NSArray *)sortDescriptors;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -171,12 +171,12 @@ GS_EXPORT_CLASS
|
|||
@end
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
|
||||
@interface NSSet (NSSortDescriptorSorting)
|
||||
@interface GS_GENERIC_CLASS(NSSet, ElementT) (NSSortDescriptorSorting)
|
||||
/**
|
||||
* Produces a sorted array from using the mechanism described for
|
||||
* [NSMutableArray-sortUsingDescriptors:]
|
||||
*/
|
||||
- (NSArray *) sortedArrayUsingDescriptors: (NSArray *)sortDescriptors;
|
||||
- (GS_GENERIC_CLASS(NSArray, ElementT) *) sortedArrayUsingDescriptors: (NSArray *)sortDescriptors;
|
||||
@end
|
||||
#endif
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ typedef uint16_t unichar;
|
|||
#define NSMaximumStringLength (INT_MAX-1)
|
||||
#endif
|
||||
|
||||
@class NSArray;
|
||||
@class GS_GENERIC_CLASS(NSArray, ElementT);
|
||||
@class NSCharacterSet;
|
||||
@class NSData;
|
||||
@class NSDictionary;
|
||||
|
@ -576,7 +576,7 @@ GS_EXPORT_CLASS
|
|||
- (NSString*) stringByAppendingString: (NSString*)aString;
|
||||
|
||||
// Dividing Strings into Substrings
|
||||
- (NSArray*) componentsSeparatedByString: (NSString*)separator;
|
||||
- (GS_GENERIC_CLASS(NSArray, NSString*) *) componentsSeparatedByString: (NSString*)separator;
|
||||
- (NSString*) substringFromIndex: (NSUInteger)index;
|
||||
- (NSString*) substringToIndex: (NSUInteger)index;
|
||||
|
||||
|
@ -1024,7 +1024,7 @@ GS_EXPORT_CLASS
|
|||
* Returns NO if the above conditions are not met.
|
||||
*/
|
||||
- (BOOL) boolValue;
|
||||
- (NSArray *) componentsSeparatedByCharactersInSet: (NSCharacterSet *)separator;
|
||||
- (GS_GENERIC_CLASS(NSArray, NSString*) *) componentsSeparatedByCharactersInSet: (NSCharacterSet *)separator;
|
||||
- (NSInteger) integerValue;
|
||||
- (long long) longLongValue;
|
||||
/** Not implemented */
|
||||
|
|
Loading…
Reference in a new issue