Samond Classes Library 1.2.1-RELEASE build 181
|
Collection classes protocol. More...
#import <SCCollectionProtocols.h>
Primary Collection Properties | |
NSString * | name |
SCIndex | count |
BOOL | empty |
NSString * | description |
Additional Collection Properties | |
SCArray * | array |
SCSet * | set |
SCOrderedSet * | orderedSet |
SCDictionary * | dictionary |
SCStack * | stack |
SCQueue * | queue |
SCUnidirectionalList * | unidirectionalList |
SCBidirectionalList * | bidirectionalList |
NSArray * | foundationArray |
NSSet * | foundationSet |
NSOrderedSet * | foundationOrderedSet |
NSDictionary * | foundationDictionary |
NSEnumerator * | objectEnumerator |
Accessing Collection Properties | |
(NSString *) | - name |
(void) | - setName: |
(SCIndex) | - count |
(NSString *) | - description |
(BOOL) | - empty |
(BOOL) | - readOnly |
Initializing Collections | |
(instancetype) | - initWithCollection: |
Finding Objects in a Collection | |
(BOOL) | - containsObject: |
(BOOL) | - containsObjects: |
(BOOL) | - containsCollection: |
(BOOL) | - containsAnyObject: |
(BOOL) | - containsAnyObjectFromCollection: |
Converting Collections | |
(SCArray *) | - array |
(SCSet *) | - set |
(SCOrderedSet *) | - orderedSet |
(SCDictionary *) | - dictionary |
(SCStack *) | - stack |
(SCQueue *) | - queue |
(SCUnidirectionalList *) | - unidirectionalList |
(SCBidirectionalList *) | - bidirectionalList |
(NSArray *) | - foundationArray |
(NSSet *) | - foundationSet |
(NSOrderedSet *) | - foundationOrderedSet |
(NSDictionary *) | - foundationDictionary |
Detecting Collection Type | |
(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 |
Objects Enumerators | |
(NSEnumerator *) | - objectEnumerator |
(NSEnumerator *) | - reverseObjectEnumerator |
Collection classes protocol.
Declares the properties and methods that are mandatory for collections of any supported types.
These properties and methods does not changes the collection content.
- (SCArray *) array |
Returns the array which contains the all objects from the receiving collection.
Reimplemented in SCCollection, and SCArray.
- (SCBidirectionalList *) bidirectionalList |
Returns the bidirectional list which contains the all objects from the receiving collection.
Reimplemented in SCCollection.
- (BOOL) containsAnyObject: | (id< SCCollectioning >) | object | |
, | NS_REQUIRES_NIL_TERMINATION | ||
Returns a boolean value that indicates whether the receiving collection contains at least one object from the specified nil terminated list.
object | - first desired object |
... | - other desired objects |
NS_REQUIRES_NIL_TERMINATION | - mandatory nil pointer |
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
- (BOOL) containsAnyObjectFromCollection: | (id< SCCollection >) | collection |
Returns a boolean value that indicates whether the receiving collection contains at least one object from the specified collection of any supported type.
collection | - collection with the desired objects |
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
- (BOOL) containsCollection: | (id< SCCollection >) | collection |
Returns a boolean value that indicates whether the receiving collection contains all objects from the specified collection of any supported type.
collection | - collection with the desired objects |
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
- (BOOL) containsObject: | (id< SCCollectioning >) | object |
Returns a boolean value that indicates whether an equivalent of the given object is present in the receiving collection.
object | - desired object |
Reimplemented in SCCollection, and NSDictionary(SCDictionary).
- (BOOL) containsObjects: | (id< SCCollectioning >) | object | |
, | NS_REQUIRES_NIL_TERMINATION | ||
Returns a boolean value that indicates whether the receiving collection contains all objects from the specified nil terminated list.
object | - first desired object |
... | - other desired objects |
NS_REQUIRES_NIL_TERMINATION | - mandatory nil pointer |
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
|
required |
Returns the count of objects within the receiving collection.
|
required |
Returns the receiving collection description.
- (SCDictionary *) dictionary |
Returns the dictionary which contains the all objects from the receiving collection.
Reimplemented in SCCollection, and SCDictionary.
|
required |
Determines whether the receiving collection is empty or contains at least one object.
- (NSArray *) foundationArray |
Returns the class NSArray instance which contains the all objects from the receiving collection.
Reimplemented in SCCollection.
- (NSDictionary *) foundationDictionary |
Returns the class NSDictionary instance which contains the all objects from the receiving collection.
Reimplemented in SCCollection.
- (NSOrderedSet *) foundationOrderedSet |
Returns the class NSOrderedSet instance which contains the all objects from the receiving collection.
Reimplemented in SCCollection.
- (NSSet *) foundationSet |
Returns the class NSSet instance which contains the all objects from the receiving collection.
Reimplemented in SCCollection.
- (instancetype) initWithCollection: | (id< SCCollection >) | collection |
Initializes a collection using the specified existing collection of any supported type.
collection | - existing source collection |
SCCollectionException | - collection error detected |
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), NSSet(SCSet), SCArray, SCOrderedSet, SCDictionary, SCQueue, SCStack, SCSet, and SCList.
- (BOOL) isArray |
Returns a boolean value that indicates whether a receiving instance is an array of any supported type.
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
- (BOOL) isCollection |
Returns a boolean value that indicates whether a receiving instance is a collection of any supported type.
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
- (BOOL) isDictionary |
Returns a boolean value that indicates whether a receiving instance is a dictionary of any supported type.
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
- (BOOL) isFoundationArray |
Returns a boolean value that indicates whether a receiving instance is a standard array (instances of the classes NSArray and NSMutableArray).
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
- (BOOL) isFoundationCollection |
Returns a boolean value that indicates whether a receiving instance is a standard Objective-C collection.
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
- (BOOL) isFoundationDictionary |
Returns a boolean value that indicates whether a receiving instance is a standard dictionary (instances of the classes NSDictionary and NSMutableDictionary).
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
- (BOOL) isFoundationOrderedSet |
Returns a boolean value that indicates whether a receiving instance is a standard orderde set (instances of the classes NSOrderedSet and NSMutableOrderedSet).
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
- (BOOL) isFoundationSet |
Returns a boolean value that indicates whether a receiving instance is a standard set (instances of the classes NSSet and NSMutableSet).
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
- (BOOL) isLibraryArray |
Returns a boolean value that indicates whether a receiving instance is a library array (class SCArray instance).
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
- (BOOL) isLibraryCollection |
Returns a boolean value that indicates whether a receiving instance is a library collection.
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
- (BOOL) isLibraryDictionary |
Returns a boolean value that indicates whether a receiving instance is a library dictionary (class SCDictionary instance).
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
- (BOOL) isLibraryOrderedSet |
Returns a boolean value that indicates whether a receiving instance is a library ordered set (class SCOrderedSet instance).
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
- (BOOL) isLibrarySet |
Returns a boolean value that indicates whether a receiving instance is a library set (class SCSet instance).
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
- (BOOL) isList |
Returns a boolean value that indicates whether a receiving instance is a list (instances of the classes SCUnidirectionalList and SCBidirectionalList).
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
- (BOOL) isOrderedSet |
Returns a boolean value that indicates whether a receiving instance is an ordered set of any supported type.
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
- (BOOL) isQueue |
Returns a boolean value that indicates whether a receiving instance is a queue (class SCQueue instance).
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
- (BOOL) isSet |
Returns a boolean value that indicates whether a receiving instance is a set of any supported type.
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
- (BOOL) isSortable |
Returns a boolean value that indicates whether a receiving instance is a sortable collection (array or ordered set of any supported type).
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
- (BOOL) isStack |
Returns a boolean value that indicates whether a receiving instance is a stack (class SCStack instance).
Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).
|
optional |
Returns the name of the receiving collection.
- (NSEnumerator *) objectEnumerator |
Returns an enumerator object that lets you access each object within the collection.
- (SCOrderedSet *) orderedSet |
Returns the ordered set which contains the all objects from the receiving collection.
Reimplemented in SCCollection, and SCOrderedSet.
- (SCQueue *) queue |
Returns the queue which contains the all objects from the receiving collection.
Reimplemented in SCCollection, and SCQueue.
|
required |
Determines whether the receiving collection is in read only mode.
- (NSEnumerator *) reverseObjectEnumerator |
Returns an enumerator object that lets you access each object within the collection, in reverse order.
- (SCSet *) set |
Returns the set which contains the all objects from the receiving collection.
Reimplemented in SCCollection, and SCSet.
|
optional |
Sets the name of the receiving collection.
name | - the collection name |
- (SCStack *) stack |
Returns the stack which contains the all objects from the receiving collection.
Reimplemented in SCCollection, and SCStack.
- (SCUnidirectionalList *) unidirectionalList |
Returns the unidirectional list which contains the all objects from the receiving collection.
Reimplemented in SCCollection.
|
readnonatomicretain |
Array with the all collection objects.
|
readnonatomicretain |
Bidirectional list with the all collection objects.
|
readrequirednonatomicassign |
Number of objects within the collection.
|
readnonatomicretain |
Collection description.
|
readnonatomicretain |
Dictionary with the all collection objects.
|
readnonatomicassign |
Determines whether the collection is empty or contains at least one object.
|
readnonatomicretain |
Class NSArray instance with the all collection objects.
|
readnonatomicretain |
Class NSDictionary instance with the all collection objects.
|
readnonatomicretain |
Class NSOrderedSet instance with the all collection objects
|
readnonatomicretain |
Class NSSet instance with the all collection objects.
|
readwriteoptionalnonatomicretain |
Name of collection.
|
readnonatomicretain |
Enumerate object that lets you access each object within collection.
|
readnonatomicretain |
Ordered set with the all collection objects
|
readnonatomicretain |
Queue with the all collection objects.
|
readnonatomicretain |
Set with the all collection objects.
|
readnonatomicretain |
Stack with the all collection objects.
|
readnonatomicretain |
Unidirectional list with the all collection objects.