Monotone-Parent: 8f8ecd8d738bfaf099722644bfbdaee74d8b589d

Monotone-Revision: 8eb1c04a52c5c9e085d3376ba6f9142b007cf6b7

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-02-22T21:21:24
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2008-02-22 21:21:24 +00:00
parent b416756551
commit 2269eaf1bf
3 changed files with 20 additions and 0 deletions

View File

@@ -1,5 +1,8 @@
2008-02-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/NSArray+Utilities.m ([NSArray -uniqueObjects]):
new method that returns unique occurences of the objects.
* SoObjects/Contacts/SOGoContactGCSFolder.m ([SOGoContactGCSFolder
-davNamespaces]): same as below.

View File

@@ -36,6 +36,8 @@
- (NSArray *) objectsForKey: (NSString *) key;
- (NSArray *) flattenedArray;
- (NSArray *) uniqueObjects;
- (BOOL) containsCaseInsensitiveString: (NSString *) match;
#ifdef GNUSTEP_BASE_LIBRARY

View File

@@ -105,6 +105,21 @@
return flattenedArray;
}
- (NSArray *) uniqueObjects
{
NSMutableArray *newArray;
NSEnumerator *objects;
id currentObject;
newArray = [NSMutableArray array];
objects = [self objectEnumerator];
while ((currentObject = [objects nextObject]))
[newArray addObjectUniquely: currentObject];
return newArray;
}
- (void) makeObjectsPerform: (SEL) selector
withObject: (id) object1
withObject: (id) object2