Samond Classes Library 1.2.4-RELEASE build 198
List of all members
SCSet Class Reference

Unordered set class. More...

#import <SCSet.h>

+ Inheritance diagram for SCSet:

Creating Sets

(instancetype) + setWithCoder:
 
(instancetype) + setWithContentsOfSerializedFile:
 
(instancetype) + setWithDataDictionary:
 
(instancetype) + setWithDataDictionaryFromFile:
 
(instancetype) + setWithStream:
 
(instancetype) + setWithFileStream:
 
(instancetype) + setWithData:
 
(instancetype) + setWithContentsOfFile:
 
(instancetype) + setWithContentsOfURL:
 
(instancetype) + setWithContentsOfURLString:
 
(instancetype) + setWithName:
 
(instancetype) + setWithObject:
 
(instancetype) + setWithObjects:
 
(instancetype) + setWithCollection:
 
(instancetype) + setWithSet:
 
(instancetype) + setWithArray:
 
(instancetype) + set
 

Initializing Sets

(instancetype) - initWithName:
 
(instancetype) - initWithObject:
 
(instancetype) - initWithObjects:
 
(instancetype) - initWithCollection:
 
(instancetype) - initWithSet:
 
(instancetype) - initWithArray:
 
(instancetype) - init
 

Copying Sets

(void) - setSet:
 
(void) - setArray:
 

Comparing Sets

(BOOL) - isSubsetOfSet:
 
(BOOL) - intersectsSet:
 
(BOOL) - isEqualToSet:
 
(BOOL) - isEqualToArray:
 

Deriving New Sets

(SCSet *) - setByAddingObject:
 
(SCSet *) - setByAddingObjects:
 
(SCSet *) - setByAddingObjectsFromArray:
 
(SCSet *) - setByAddingArray:
 
(SCSet *) - setByAddingObjectsFromSet:
 
(SCSet *) - setByAddingSet:
 
(SCSet *) - setByAddingCollection:
 

Adding Objects

(void) - addObjectsFromArray:
 
(void) - addArray:
 
(void) - addObjectsFromSet:
 
(void) - addSet:
 

Accessing Set Members

SCArrayallObjects
 
id anyObject
 
(id) - member:
 

Combining and Recombining Sets

(void) - unionSet:
 
(void) - minusSet:
 
(void) - intersectSet:
 

Additional Inherited Members

- Instance Methods inherited from SCCollection
(void) - setCollection:
 
(void) - setObject:
 
(void) - setObjects:
 
(BOOL) - isEqualToCollection:
 
(BOOL) - isEqual:
 
(void) - enumerateWithDelegate:
 
(void) - enumerate
 
(void) - reverseEnumerateWithDelegate:
 
(void) - reverseEnumerate
 
(void) - addObjects:
 
(void) - addCollection:
 
(void) - removeObjectsWithClassName:
 
(void) - removeCollection:
 
(void) - removeObjects:
 
(BOOL) - containsObjects:
 
(BOOL) - containsCollection:
 
(BOOL) - containsAnyObject:
 
(BOOL) - containsAnyObjectFromCollection:
 
- Instance Methods inherited from SCObject
(instancetype) - initWithContentsOfSerializedFile:
 
(BOOL) - writeContentsToSerializedFile:
 
(instancetype) - initWithDataDictionaryFromFile:
 
(void) - writeToDataDictionaryFile:atomically:
 
(void) - writeToDataDictionaryFile:
 
(NSDictionary *) - dataDictionary
 
(instancetype) - initWithFileStream:
 
(void) - writeToFileStream:
 
(void) - appendToFileStream:
 
(instancetype) - initWithData:
 
(instancetype) - initWithContentsOfFile:
 
(instancetype) - initWithContentsOfURL:
 
(instancetype) - initWithContentsOfURLString:
 
(BOOL) - writeToFile:
 
(BOOL) - writeToURL:
 
(BOOL) - writeToURLString:
 
(NSData *) - data
 
- Instance Methods inherited from <SCMutableCollection>
- Instance Methods inherited from <SCCollection>
- Class Methods inherited from SCCollection
(BOOL) + isCollectionClass:
 
(BOOL) + isLibraryCollectionClass:
 
(BOOL) + isFoundationCollectionClass:
 
(BOOL) + isArrayClass:
 
(BOOL) + isLibraryArrayClass:
 
(BOOL) + isFoundationArrayClass:
 
(BOOL) + isSetClass:
 
(BOOL) + isLibrarySetClass:
 
(BOOL) + isFoundationSetClass:
 
(BOOL) + isOrderedSetClass:
 
(BOOL) + isLibraryOrderedSetClass:
 
(BOOL) + isFoundationOrderedSetClass:
 
(BOOL) + isDictionaryClass:
 
(BOOL) + isLibraryDictionaryClass:
 
(BOOL) + isFoundationDictionaryClass:
 
(BOOL) + isStackClass:
 
(BOOL) + isQueueClass:
 
(BOOL) + isListClass:
 
(BOOL) + isSortableClass:
 
(BOOL) + isCollection:
 
(BOOL) + isLibraryCollection:
 
(BOOL) + isFoundationCollection:
 
(BOOL) + isArray:
 
(BOOL) + isLibraryArray:
 
(BOOL) + isFoundationArray:
 
(BOOL) + isSet:
 
(BOOL) + isLibrarySet:
 
(BOOL) + isFoundationSet:
 
(BOOL) + isOrderedSet:
 
(BOOL) + isLibraryOrderedSet:
 
(BOOL) + isFoundationOrderedSet:
 
(BOOL) + isDictionary:
 
(BOOL) + isLibraryDictionary:
 
(BOOL) + isFoundationDictionary:
 
(BOOL) + isStack:
 
(BOOL) + isQueue:
 
(BOOL) + isList:
 
(BOOL) + isSortable:
 
- Properties inherited from SCCollection
NSString * name
 
SCIndex count
 
BOOL empty
 
BOOL readOnly
 
id< SCCollectionDelegatedelegate
 
NSString * typeName
 
NSEnumerator * objectEnumerator
 
NSEnumerator * reverseObjectEnumerator
 
SCArrayarray
 
SCSetset
 
SCOrderedSetorderedSet
 
SCDictionarydictionary
 
SCStackstack
 
SCQueuequeue
 
SCUnidirectionalListunidirectionalList
 
SCBidirectionalListbidirectionalList
 
NSArray * foundationArray
 
NSSet * foundationSet
 
NSOrderedSet * foundationOrderedSet
 
NSDictionary * foundationDictionary
 
SCCollectionType collectionType
 
BOOL isCollection
 
BOOL isLibraryCollection
 
BOOL isFoundationCollection
 
BOOL isArray
 
BOOL isLibraryArray
 
BOOL isFoundationArray
 
BOOL isSet
 
BOOL isLibrarySet
 
BOOL isFoundationSet
 
BOOL isOrderedSet
 
BOOL isLibraryOrderedSet
 
BOOL isFoundationOrderedSet
 
BOOL isDictionary
 
BOOL isLibraryDictionary
 
BOOL isFoundationDictionary
 
BOOL isStack
 
BOOL isQueue
 
BOOL isList
 
BOOL isSortable
 
- Properties inherited from SCObject
NSString * className
 
- Properties inherited from <SCCollection>
NSString * name
 
SCIndex count
 
BOOL empty
 
BOOL readOnly
 
id< SCCollectionDelegatedelegate
 
SCArrayarray
 
SCSetset
 
SCOrderedSetorderedSet
 
SCDictionarydictionary
 
SCStackstack
 
SCQueuequeue
 
SCUnidirectionalListunidirectionalList
 
SCBidirectionalListbidirectionalList
 
NSArray * foundationArray
 
NSSet * foundationSet
 
NSOrderedSet * foundationOrderedSet
 
NSDictionary * foundationDictionary
 
NSEnumerator * objectEnumerator
 
NSEnumerator * reverseObjectEnumerator
 
SCCollectionType collectionType
 
BOOL isCollection
 
BOOL isLibraryCollection
 
BOOL isFoundationCollection
 
BOOL isArray
 
BOOL isLibraryArray
 
BOOL isFoundationArray
 
BOOL isSet
 
BOOL isLibrarySet
 
BOOL isFoundationSet
 
BOOL isOrderedSet
 
BOOL isLibraryOrderedSet
 
BOOL isFoundationOrderedSet
 
BOOL isDictionary
 
BOOL isLibraryDictionary
 
BOOL isFoundationDictionary
 
BOOL isStack
 
BOOL isQueue
 
BOOL isList
 
BOOL isSortable
 

Detailed Description

Unordered set class.

SDK
macOS 10.6+, iOS 7.0+, GNUstep
Since
version 1.1.3

Implements the unordered object sets.
Class instances can thrown the following exceptions:

Method Documentation

- (void) addArray: (SCArray *)  array

Adds into the receiving set the objects from a given array.

Parameters
array- the array with objects to add into the set
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- addObjectsFromArray:
- (void) addObjectsFromArray: (SCArray *)  array

Adds into the receiving set the objects from a given array.

Parameters
array- the array with objects to add into the set
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- addArray:
- (void) addObjectsFromSet: (SCSet *)  set

Adds into the receiving set the objects from a given another set.

Parameters
set- the set with objects to add into the set
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- addSet:
- (void) addSet: (SCSet *)  set

Adds into the receiving set the objects from a given another set.

Parameters
set- the set with objects to add into the set
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- addObjectsFromSet:
- (instancetype) init

Initializes an empty unnamed set using the default settings.

Returns
A newly initialized set

Reimplemented from SCCollection.

- (instancetype) initWithArray: (SCArray *)  array

Initializes a newly allocated set with the settings and objects from a given array.

Parameters
array- an array of objects to add to the new set
Returns
A newly initialized set
Since
version 1.2.3
- (instancetype) initWithCollection: (id<SCCollection>)  collection

Initializes a set using the objects from the specified collection of any supported type.

Parameters
collection- an existing source collection
Returns
A newly initialized set with the objects from the specified collection
Exceptions
SCCollectionException- collection error detected

Reimplemented from SCCollection.

- (instancetype) initWithName: (NSString *)  name

Initializes an empty set using the specified set name.
Designed initializer

Parameters
name- еру name of the set
Returns
A newly initialized set

Reimplemented from SCCollection.

- (instancetype) initWithObject: (id<SCCollectioning>)  object

Initializes a set using the specified existing object.

Parameters
object- an existing source object
Returns
A newly initializes set with the specified object
Exceptions
SCCollectionException- collection error detected
- (instancetype) initWithObjects: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Initializes a set using the existing objects from the specified nil terminated list.

Parameters
object- the first object within the list
...- other objects within the list
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
A newly initialized set with the objects from the specified list
- (instancetype) initWithSet: (SCSet *)  set

Initializes a set using the settings and content of the specified existing set.

Attention
Designed initializer
Parameters
set- an existing source set
Returns
A newly initialized set with the settings and content of the specified set
Exceptions
SCCollectionException- collection error detected
- (void) intersectSet: (id<SCCollection>)  set

Removes from the receiving set each object that isn't a member of the specified collection of any supported type.

Parameters
set- the collection with which to perform the intersection
Exceptions
SCCollectionException- collection error detected
- (BOOL) intersectsSet: (id<SCCollection>)  set

Returns a boolean value that indicates whether at least one object in the receiving set is also present in the specified collection of any supported type.

Parameters
set- the collection with which to compare the receiving set
Returns
YES if at least one object in the receiving set is also present in the specified collection, otherwise NO
Exceptions
SCCollectionException- collection error detected
- (BOOL) isEqualToArray: (SCArray *)  array

Compares the contents of the receiving set to the contents of the specified array.

Parameters
array- the array with which to compare the receiving set
Returns
YES of the contents of the specified array is equals to the contents of the receiving set, otherwise NO
- (BOOL) isEqualToSet: (SCSet *)  set

Compares the contents of the receiving set to the contents of the specified another set.

Parameters
set- the set with which to compare the receiving set
Returns
YES if the contents of the specified set is equals to the contents of the receing set, otherwise NO
- (BOOL) isSubsetOfSet: (id<SCCollection>)  set

Returns a boolean value that indicates whether every object in the receiving set is also present in the specified collection of any supported type.

Parameters
set- the collection with which to compare the receiving set
Returns
YES if every object in the receiving set is also present in the specified collection, otherwise NO
Exceptions
SCCollectionException- collection erro detected
- (id) member: (id<SCCollectioning>)  object

Determines whether the set contains an object equal to a given object, and returns that object if it is present.

Parameters
object- the object for which to test for membership of the set
Returns
If the set contains an object equal to a given object then that object, otherwise nil
Since
version 1.2.3
- (void) minusSet: (id<SCCollection>)  set

Removes each object in the specified collection of any supported type from the receiving set, if present.

Parameters
set- the collection of objects to remove from the receiving list
Exceptions
SCCollectionException- collection error detected
+ (instancetype) set

Returns an empty unnamed set created by using the default settings.

Returns
A created set
- (void) setArray: (SCArray *)  array

Empties the receiving set, then copies the settings and adds each object contained in the specified array.

Parameters
array- the array whose members replace the receiving set content and settings.
Exceptions
SCCollectionException- collection error detected
- (SCSet *) setByAddingArray: (SCArray *)  array

Returns a new set that contains the objects from the receiving set and objects from a given array.

Parameters
array- the array with added objects
Returns
A new set with objects from the receiving set and objects from a given array.
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- setByAddingObjectsFromArray:
- (SCSet *) setByAddingCollection: (id<SCCollection>)  collection

Returns a new set that contains objects from the receiving set and objects from a given collection of any supported type.

Parameters
collection- the collection with objects to add to the set
Returns
A new set with objects from the receiving set and objects from a given collection
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
- (SCSet *) setByAddingObject: (id<SCCollectioning>)  object

Returns a new set formed by adding a given object to the receiving set.

Parameters
object- the object to add to the set
Returns
A new set that contains objects from the receiving set and a given object
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
- (SCSet *) setByAddingObjects: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Returns a new set that contains objects from the receiving set and objects from the specified list.

Parameters
object- the first object to add into the new set
...- a comma-separated list of additional objects, ending with nil pointer
NS_REQUIRES_NIL_TERMINATION- a mandatory nil pointer
Returns
A new set with objects from the receiving set and objects from the specified list
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
- (SCSet *) setByAddingObjectsFromArray: (SCArray *)  array

Returns a new set that contains the objects from the receiving set and objects from a given array.

Parameters
array- the array with added objects
Returns
A new set with objects from the receiving set and objects from a given array.
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- setByAddingArray:
- (SCSet *) setByAddingObjectsFromSet: (SCSet *)  set

Returns a new set that contains the objects from the receiving set and objects from a given another set.

Parameters
set- the set with objects to add to the set
Returns
A new set with objects from the receiving set and objects from a given another set.
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- setByAddingSet:
- (SCSet *) setByAddingSet: (SCSet *)  set

Returns a new set that contains the objects from the receiving set and objects from a given another set.

Parameters
set- the set with objects to add to the set
Returns
A new set with objects from the receiving set and objects from a given another set.
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- setByAddingObjectsFromSet:
- (void) setSet: (SCSet *)  set

Empties the receiving set, then copies the settings and adds each object contained in another given set.

Parameters
set- the set whose members replace the receiving set content and settings.
Exceptions
SCCollectionException- collection error detected
+ (instancetype) setWithArray: (SCArray *)  array

Creates and returns a set containing a unique collection of the objects contained in a given array.

Parameters
array- an array containin the objects to add to the new set
Returns
A created set
Since
version 1.2.3
+ (instancetype) setWithCoder: (NSCoder *)  coder

Returns a set created by using the specified coder.

Parameters
coder- the source coder
Returns
A created set
+ (instancetype) setWithCollection: (id<SCCollection>)  collection

Returns a set created by using the objects from the specified existing collection of any supported type.

Parameters
collection- the existing source collection
Returns
A created set with the objects from the specified collection
Exceptions
SCCollectionException- collection error detected
+ (instancetype) setWithContentsOfFile: (NSString *)  path

Returns a set created by using the file with the specified path.

Parameters
path- the path to the source file
Returns
A created set
+ (instancetype) setWithContentsOfSerializedFile: (NSString *)  path

Returns a set created by using the content of serialized file with the specified path.

Parameters
path- the path of the source serialized file
Returns
A created set
+ (instancetype) setWithContentsOfURL: (NSURL *)  url

Returns a set created by using the specified URL.

Parameters
url- the source URL
Returns
A created set
+ (instancetype) setWithContentsOfURLString: (NSString *)  urlString

Returns a set created by using the data from the URL with the specified string.

Parameters
urlString- the string of the source URL
Returns
A created set
+ (instancetype) setWithData: (NSData *)  data

Returns a set created by using the specified data object.

Parameters
data- the source data object
Returns
A created set
+ (instancetype) setWithDataDictionary: (NSDictionary *)  dictionary

Returns a set created by using the specified data dictionary.

Parameters
dictionary- the source data dictionary
Returns
A created set
+ (instancetype) setWithDataDictionaryFromFile: (NSString *)  path

Returns a set created by using the data dictionary from the specified file.

Parameters
path- the path of the source dictionary file
Returns
A created set
+ (instancetype) setWithFileStream: (NSString *)  path

Returns a set created by using the data from the file stream with the specified path.

Parameters
path- the path of the source file stream
Returns
A created set
Exceptions
SCStreamException- stream error detected
SCSystemException- system error detected
+ (instancetype) setWithName: (NSString *)  name

Returns an empty set created by using the specified set name.

Parameters
name- the name of the set
Returns
A created set
+ (instancetype) setWithObject: (id<SCCollectioning>)  object

Returns a set created by using the specified existing object.

Parameters
object- existing source object
Returns
A created set with the specified object
Exceptions
SCCollectionException- collection error detected
+ (instancetype) setWithObjects: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Returns a set created by using the existing objects from the specified nil terminated list.

Parameters
object- the first object within the list
...- other objects within the list
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
A created set with the specified objects
+ (instancetype) setWithSet: (SCSet *)  set

Returns a set created by using the specified existing set.

Parameters
set- an existing source set
Returns
A created set with the settings and objects from the specified existing set
Exceptions
SCCollectionException- collection error detected
+ (instancetype) setWithStream: (SCStream *)  stream

Returns a set created by using the data from the specified stream.

Parameters
stream- the source stream
Returns
A created set
Exceptions
SCStreamException- stream error detected
SCSystemException- system error detected
- (void) unionSet: (id<SCCollection>)  set

Adds each object in the specified collection of any supported type to the receiving set, if not present.

Parameters
set- the collection of objects to add to the receiving list
Exceptions
SCCollectionException- collection error detected

Property Documentation

- (SCArray *) allObjects
readnonatomicassign

An array containing the members of the set, or an empty array if the set has no members

- (id) anyObject
readnonatomicassign

One of the objects in the set, or nil if the set contains no objects


The documentation for this class was generated from the following files: