Samond Classes Library 1.2.1-RELEASE build 181
List of all members
<SCCollection> Protocol Reference

Collection classes protocol. More...

#import <SCCollectionProtocols.h>

Inheritance diagram for <SCCollection>:
NSArray(SCArray) NSDictionary(SCDictionary) NSOrderedSet(SCOrderedSet) NSSet(SCSet) <SCIndexedCollection> <SCMutableCollection> NSArray(SCArray) NSOrderedSet(SCOrderedSet) SCArray <SCMutableIndexedCollection> SCOrderedSet NSMutableArray(SCMutableArray) NSMutableDictionary(SCMutableDictionary) NSMutableOrderedSet(SCMutableOrderedSet) NSMutableSet(SCMutableSet) SCCollection

Primary Collection Properties

NSString * name
 
SCIndex count
 
BOOL empty
 
NSString * description
 

Additional Collection Properties

SCArrayarray
 
SCSetset
 
SCOrderedSetorderedSet
 
SCDictionarydictionary
 
SCStackstack
 
SCQueuequeue
 
SCUnidirectionalListunidirectionalList
 
SCBidirectionalListbidirectionalList
 
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
 

Detailed Description

Collection classes protocol.

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

Declares the properties and methods that are mandatory for collections of any supported types.
These properties and methods does not changes the collection content.

Method Documentation

- (SCArray *) array

Returns the array which contains the all objects from the receiving collection.

Returns
Array with objects

Reimplemented in SCCollection, and SCArray.

- (SCBidirectionalList *) bidirectionalList

Returns the bidirectional list which contains the all objects from the receiving collection.

Returns
Bidirectional list with objects

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.

Parameters
object- first desired object
...- other desired objects
NS_REQUIRES_NIL_TERMINATION- mandatory nil pointer
Returns
YES if at least one object from the specified list is present in the receiving collection, otherwise NO

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.

Parameters
collection- collection with the desired objects
Returns
YES if at least one object from the specified collection is present in the receiving collection, otherwise NO

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.

Parameters
collection- collection with the desired objects
Returns
YES if all of objects from the specified collection are present in the receiving collection, otherwise NO

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.

Parameters
object- desired object
Returns
YES if a given object is present in the receiving collection, otherwise NO

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.

Parameters
object- first desired object
...- other desired objects
NS_REQUIRES_NIL_TERMINATION- mandatory nil pointer
Returns
YES if all objects from the specified list are present in the receiving collection, otherwise NO

Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).

- (SCIndex) count
required

Returns the count of objects within the receiving collection.

Returns
Count of objects
- (NSString *) description
required

Returns the receiving collection description.

Returns
Description string
- (SCDictionary *) dictionary

Returns the dictionary which contains the all objects from the receiving collection.

Returns
Dictionary with objects

Reimplemented in SCCollection, and SCDictionary.

- (BOOL) empty
required

Determines whether the receiving collection is empty or contains at least one object.

Returns
YES if the receiving collectio is empty, otherwise NO
- (NSArray *) foundationArray

Returns the class NSArray instance which contains the all objects from the receiving collection.

Returns
Class NSArray instance with objects

Reimplemented in SCCollection.

- (NSDictionary *) foundationDictionary

Returns the class NSDictionary instance which contains the all objects from the receiving collection.

Returns
Class NSDictionary instance with objects

Reimplemented in SCCollection.

- (NSOrderedSet *) foundationOrderedSet
SDK
macOS 10.7+, iOS 7.0+

Returns the class NSOrderedSet instance which contains the all objects from the receiving collection.

Returns
Class NSOrderedSet instance with objects

Reimplemented in SCCollection.

- (NSSet *) foundationSet

Returns the class NSSet instance which contains the all objects from the receiving collection.

Returns
Class NSSet instance with objects

Reimplemented in SCCollection.

- (instancetype) initWithCollection: (id< SCCollection >)  collection

Initializes a collection using the specified existing collection of any supported type.

Parameters
collection- existing source collection
Returns
A newly initialized collection
Exceptions
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.

Returns
YES if the receiving instance is an array, otherwise NO

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.

Returns
YES if the receiving instance is a collection of any supported type, otherwise NO

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.

Returns
YES if the receiving instance is a dictionary, otherwise NO

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).

Returns
YES if the receiving instance is a standard array, otherwise NO

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.

Returns
YES if the receiving instance is a standard collection, otherwise NO

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).

Returns
YES if the receiving instance is a standard dictionary, otherwise NO

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).

Returns
YES if the receiving instance is a standard ordered set, otherwise NO

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).

Returns
YES if the receiving instance is a standard set, otherwise NO

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).

Returns
YES if the receiving instance is a library array, otherwise NO

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.

Returns
YES if the receiving instance is a library collection, otherwise NO

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).

Returns
YES if the receiving instance is a library dictionary, otherwise NO

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).

Returns
YES if the receiving instance is a library ordered set, otherwise NO

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).

Returns
YES if the receiving instance is a library set, otherwise NO

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).

Returns
YES if the receiving instance is a list, otherwise NO

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.

Returns
YES if the receiving instance is an ordered set, otherwise NO

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).

Returns
YES if the receiving instance is a queue, otherwise NO

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.

Returns
YES if the receiving instance is a set, otherwise NO

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).

Returns
YES if the receiving instance is a sortable collection, otherwise NO

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).

Returns
YES if the receiving instance is a stack, otherwise NO

Reimplemented in NSOrderedSet(SCOrderedSet), NSArray(SCArray), SCCollection, NSDictionary(SCDictionary), and NSSet(SCSet).

- (NSString *) name
optional

Returns the name of the receiving collection.

Returns
A collection name
- (NSEnumerator *) objectEnumerator

Returns an enumerator object that lets you access each object within the collection.

Returns
Enumerator object
- (SCOrderedSet *) orderedSet
SDK
macOS 10.7+, iOS 7.0+

Returns the ordered set which contains the all objects from the receiving collection.

Returns
Ordered set with objects

Reimplemented in SCCollection, and SCOrderedSet.

- (SCQueue *) queue

Returns the queue which contains the all objects from the receiving collection.

Returns
Queue with objects

Reimplemented in SCCollection, and SCQueue.

- (BOOL) readOnly
required

Determines whether the receiving collection is in read only mode.

Returns
YES if the receiving collection is read only, otherwise NO
- (NSEnumerator *) reverseObjectEnumerator

Returns an enumerator object that lets you access each object within the collection, in reverse order.

Returns
Enumerator object
- (SCSet *) set

Returns the set which contains the all objects from the receiving collection.

Returns
Set with objects

Reimplemented in SCCollection, and SCSet.

- (void) setName: (NSString *)  name
optional

Sets the name of the receiving collection.

Parameters
name- the collection name
- (SCStack *) stack

Returns the stack which contains the all objects from the receiving collection.

Returns
Stack with objects

Reimplemented in SCCollection, and SCStack.

- (SCUnidirectionalList *) unidirectionalList

Returns the unidirectional list which contains the all objects from the receiving collection.

Returns
Unidirectional list with objects

Reimplemented in SCCollection.

Property Documentation

- (SCArray*) array
readnonatomicretain

Array with the all collection objects.

- (SCBidirectionalList*) bidirectionalList
readnonatomicretain

Bidirectional list with the all collection objects.

- (SCIndex) count
readrequirednonatomicassign

Number of objects within the collection.

- (NSString*) description
readnonatomicretain

Collection description.

- (SCDictionary*) dictionary
readnonatomicretain

Dictionary with the all collection objects.

- (BOOL) empty
readnonatomicassign

Determines whether the collection is empty or contains at least one object.

- (NSArray*) foundationArray
readnonatomicretain

Class NSArray instance with the all collection objects.

- (NSDictionary*) foundationDictionary
readnonatomicretain

Class NSDictionary instance with the all collection objects.

- (NSOrderedSet*) foundationOrderedSet
readnonatomicretain

Class NSOrderedSet instance with the all collection objects

SDK
macOS 10.7+, iOS 7.0+.
- (NSSet*) foundationSet
readnonatomicretain

Class NSSet instance with the all collection objects.

- (NSString*) name
readwriteoptionalnonatomicretain

Name of collection.

- (NSEnumerator*) objectEnumerator
readnonatomicretain

Enumerate object that lets you access each object within collection.

- (SCOrderedSet*) orderedSet
readnonatomicretain

Ordered set with the all collection objects

SDK
macOS 10.7+, iOS 7.0+.
- (SCQueue*) queue
readnonatomicretain

Queue with the all collection objects.

- (SCSet*) set
readnonatomicretain

Set with the all collection objects.

- (SCStack*) stack
readnonatomicretain

Stack with the all collection objects.

- (SCUnidirectionalList*) unidirectionalList
readnonatomicretain

Unidirectional list with the all collection objects.


The documentation for this protocol was generated from the following file: