NSMutableSet(FunkyUtilities)
@interface NSMutableSet <ObjectType>
(FunkyUtilities) @end
This extension provides simple and easy to use functional and general utilities for NSMutableSet.
If you need to prefix the extension methods in this category, you should import NSSet+FunkyPrefixedUtilities.h
, where every utility method is prefixed with the funky_
keyword for compatiblitiy reasons.
See
Prefixed counterpartNSMutableSet(FunkyPrefixedUtilities)
See
Immutable counterpartNSSet(FunkyUtilities)
-
Takes the union of the two sets
See
Immutable counterpart-[NSSet(FunkyUtilities) takingUnion:]
See
Prefixed counterpart-[NSMutableSet(FunkyPrefixedUtilities) funky_takeUnion:]
Declaration
Objective-C
- (void)takeUnion:(NSSet *)set;
Swift
func takeUnion(_ set: Set
Parameters
set
The other collection to union with
-
Takes the minus of the two sets by taking the current minus the provided one.
See
Immutable counterpart-[NSSet(FunkyUtilities) takingMinus:]
See
Prefixed counterpart-[NSMutableSet(FunkyPrefixedUtilities) funky_takeMinus:]
Declaration
Objective-C
- (void)takeMinus:(NSSet<ObjectType> *)set;
Swift
func takeMinus(_ set: Set
Parameters
set
The other collection to minus with
-
Takes the intersection of the two sets.
See
Immutable counterpart-[NSSet(FunkyUtilities) takingIntersection:]
See
Prefixed counterpart-[NSMutableSet(FunkyPrefixedUtilities) funky_takeIntersection:]
Declaration
Objective-C
- (void)takeIntersection:(NSSet<ObjectType> *)set;
Swift
func takeIntersection(_ set: Set
Parameters
set
The other collection to intersect with
-
Filters the set using the given predicate, keeping the elements that are passing the test.
See
Immutable counterpart-[NSSet(FunkyUtilities) filtered:]
See
Prefixed counterpart-[NSMutableSet(FunkyPrefixedUtilities) funky_filter:]
Declaration
Objective-C
- (void)filter:(BOOL (^)(ObjectType))block;
Swift
func filter(_ block: ((Any?) -> Bool)!)
Parameters
block
The predicate used to filter the results.
-
Makes the set structure a squence with flat elements, containing no NSSets
See
Immutable counterpart-[NSSet(FunkyUtilities) flattened]
See
Prefixed counterpart-[NSMutableSet(FunkyPrefixedUtilities) funky_flatten]
Declaration
Objective-C
- (void)flatten;
Swift
func flatten()