Samond Classes Library 1.2.1-RELEASE build 181
List of all members
SCSet Class Reference

Unordered set class. More...

#import <SCSet.h>

Inheritance diagram for SCSet:
SCCollection SCObject <SCMutableCollection> <SCCollection>

Creating Sets

(instancetype) + setWithCoder:
 
(instancetype) + setWithContentsOfSerializedFile:
 
(instancetype) + setWithDataDictionary:
 
(instancetype) + setWithDataDictionaryFromFile:
 
(instancetype) + setWithStream:
 
(instancetype) + setWithFileStream:
 
(instancetype) + setWithName:
 
(instancetype) + setWithObject:
 
(instancetype) + setWithObjects:
 
(instancetype) + setWithCollection:
 
(instancetype) + setWithSet:
 
(instancetype) + set
 

Initializing Sets

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

Copying Sets

(void) - setSet:
 

Comparing Sets

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

Accessing Set Members

SCArrayallObjects
 
id anyObject
 

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:
 
(BOOL) - isCollection
 
(BOOL) - isLibraryCollection
 
(BOOL) - isFoundationCollection
 
(BOOL) - isArray
 
(BOOL) - isLibraryArray
 
(BOOL) - isFoundationArray
 
(BOOL) - isFoundationSet
 
(BOOL) - isOrderedSet
 
(BOOL) - isLibraryOrderedSet
 
(BOOL) - isFoundationOrderedSet
 
(BOOL) - isDictionary
 
(BOOL) - isLibraryDictionary
 
(BOOL) - isFoundationDictionary
 
(BOOL) - isStack
 
(BOOL) - isQueue
 
(BOOL) - isList
 
(BOOL) - isSortable
 
- Instance Methods inherited from SCObject
(instancetype) - initWithContentsOfSerializedFile:
 
(BOOL) - writeContentsToSerializedFile:
 
(instancetype) - initWithDataDictionaryFromFile:
 
(void) - writeToDataDictionaryFile:atomically:
 
(void) - writeToDataDictionaryFile:
 
(NSDictionary *) - dataDictionary
 
(instancetype) - initWithFileStream:
 
(void) - writeToFileStream:
 
(void) - appendToFileStream:
 
- 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
 
BOOL readOnly
 
id< SCCollectionDelegatedelegate
 
SCIndex count
 
BOOL empty
 
NSString * typeName
 
NSString * description
 
NSEnumerator * objectEnumerator
 
NSEnumerator * reverseObjectEnumerator
 
- Properties inherited from <SCCollection>
NSString * name
 
SCIndex count
 
BOOL empty
 
NSString * description
 
SCArrayarray
 
SCSetset
 
SCOrderedSetorderedSet
 
SCDictionarydictionary
 
SCStackstack
 
SCQueuequeue
 
SCUnidirectionalListunidirectionalList
 
SCBidirectionalListbidirectionalList
 
NSArray * foundationArray
 
NSSet * foundationSet
 
NSOrderedSet * foundationOrderedSet
 
NSDictionary * foundationDictionary
 
NSEnumerator * objectEnumerator
 

Detailed Description

Unordered set class.

SDK
macOS 10.6+, iOS 7.0+
Since
version 1.1.3

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

Method Documentation

- (instancetype) init

Initializes an empty unnamed set using the default settings.

Returns
A newly initialized set
- (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.

Attention
Designed initializer
Parameters
name- еру name of the set
Returns
A newly initialized set
- (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) isEqualToContentsOfSet: (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 equal to the contents of the receiving set, otherwise NO
- (BOOL) isEqualToSet: (SCSet *)  set

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

Parameters
set- the set with which to compare the receiving set
Returns
YES if the settings and contents of the specified set are equal to the settings and 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
- (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

Reimplemented from SCCollection.

- (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) 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) 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) 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
readnonatomicretain

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

- (id) anyObject
readnonatomicretain

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: