Samond Classes Library 1.2.6-STABLE build 219
List of all members
<SCCollection> Protocol Reference

Collection classes protocol. More...

#import <SCCollectionProtocols.h>

+ Inheritance diagram for <SCCollection>:

Primary Collection Properties

NSString * name
 
SCIndex count
 
BOOL empty
 
BOOL readOnly
 
id< SCCollectionDelegatedelegate
 

Converting Collections

SCArrayarray
 
SCSetset
 
SCOrderedSetorderedSet
 
SCDictionarydictionary
 
SCStackstack
 
SCQueuequeue
 
SCUnidirectionalListunidirectionalList
 
SCBidirectionalListbidirectionalList
 
NSArray * foundationArray
 
NSSet * foundationSet
 
NSOrderedSet * foundationOrderedSet
 
NSDictionary * foundationDictionary
 

Objects Enumerators

NSEnumerator * objectEnumerator
 
NSEnumerator * reverseObjectEnumerator
 
(NSUInteger) - countByEnumeratingWithState:objects:count:
 

Detecting Collection Type

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
 

Initializing Collections

(instancetype) - initWithCollection:
 

Finding Objects in a Collection

(BOOL) - containsObject:
 
(BOOL) - containsObjects:
 
(BOOL) - containsCollection:
 
(BOOL) - containsAnyObject:
 
(BOOL) - containsAnyObjectFromCollection:
 

Comparing Collections

(BOOL) - isEqualToCollection:
 

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

- (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 SCCollection, NSOrderedSet(SCOrderedSet), NSArray(SCArray), 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 SCCollection, NSOrderedSet(SCOrderedSet), NSArray(SCArray), 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 SCCollection, NSOrderedSet(SCOrderedSet), NSArray(SCArray), 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 SCCollection, NSOrderedSet(SCOrderedSet), NSArray(SCArray), NSDictionary(SCDictionary), and NSSet(SCSet).

- (NSUInteger) countByEnumeratingWithState: (NSFastEnumerationState *)  state
objects: (id *)  objects
count: (NSUInteger)  count 

Returns by reference a C array of objects over which the sender should iterate, and as the return value the number of objects in the array.

Parameters
state- context information that is used in the enumeration to, in addition to other possibilities, ensure that the collection has not been mutated
objects- a C array of objects over which the sender is to iterate
count- the maximum number of objects to return in a C array
Returns
The number of objects returned in a C array or 0 when the iteration is finished
Since
version 1.2.5

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 SCCollection, NSOrderedSet(SCOrderedSet), NSArray(SCArray), NSDictionary(SCDictionary), NSSet(SCSet), SCArray, SCOrderedSet, SCDictionary, SCQueue, SCStack, SCSet, and SCList.

- (BOOL) isEqualToCollection: (id< SCCollection >)  collection

Returns a boolean value that indicates whether the contents of the receiving collection is equals to the contents of another given collection.

Parameters
collection- the collection with which to compare the receiving collection
Returns
YES if the contents of other collection is equals to the contents collection, otherwise NO

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

Property Documentation

- (SCArray*) array
readnonatomicassign

Array with the all collection objects

- (SCBidirectionalList*) bidirectionalList
readnonatomicassign

Bidirectional list with the all collection objects

- (SCCollectionType) collectionType
readnonatomicassign

A type of the collection

- (SCIndex) count
readnonatomicassign

Number of objects within the collection

- (id<SCCollectionDelegate>) delegate
readnonatomicretain

Collection delegate object

- (SCDictionary*) dictionary
readnonatomicassign

Dictionary with the all collection objects.

- (BOOL) empty
readnonatomicassign

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

- (NSArray*) foundationArray
readnonatomicassign

Class NSArray instance with the all collection objects

- (NSDictionary*) foundationDictionary
readnonatomicassign

Class NSDictionary instance with the all collection objects

- (NSOrderedSet*) foundationOrderedSet
readnonatomicassign

Class NSOrderedSet instance with the all collection objects

- (NSSet*) foundationSet
readnonatomicassign

Class NSSet instance with the all collection objects

- (BOOL) isArray
readnonatomicassign

A boolean value that indicates whether a receiving instance is an array of any supported type

- (BOOL) isCollection
readnonatomicassign

A boolean value that indicates whether a receiving instance is a collection of any supported type

- (BOOL) isDictionary
readnonatomicassign

A boolean value that indicates whether a receiving instance is a dictionary of any supported type

- (BOOL) isFoundationArray
readnonatomicassign

A boolean value that indicates whether a receiving instance is a standard array (instances of the classes NSArray and NSMutableArray)

- (BOOL) isFoundationCollection
readnonatomicassign

A boolean value that indicates whether a receiving instance is a standard Objective-C collection

- (BOOL) isFoundationDictionary
readnonatomicassign

A boolean value that indicates whether a receiving instance is a standard dictionary (instances of the classes NSDictionary and NSMutableDictionary)

- (BOOL) isFoundationOrderedSet
readnonatomicassign

A boolean value that indicates whether a receiving instance is a standard orderde set (instances of the classes NSOrderedSet and NSMutableOrderedSet)

- (BOOL) isFoundationSet
readnonatomicassign

A boolean value that indicates whether a receiving instance is a standard set (instances of the classes NSSet and NSMutableSet)

- (BOOL) isLibraryArray
readnonatomicassign

A boolean value that indicates whether a receiving instance is a library array (class SCArray instance)

- (BOOL) isLibraryCollection
readnonatomicassign

A boolean value that indicates whether a receiving instance is a library collection

- (BOOL) isLibraryDictionary
readnonatomicassign

A boolean value that indicates whether a receiving instance is a library dictionary (class SCDictionary instance)

- (BOOL) isLibraryOrderedSet
readnonatomicassign

A boolean value that indicates whether a receiving instance is a library ordered set (class SCOrderedSet instance)

- (BOOL) isLibrarySet
readnonatomicassign

A boolean value that indicates whether a receiving instance is a library set (class SCSet instance)

- (BOOL) isList
readnonatomicassign

A boolean value that indicates whether a receiving instance is a list (instances of the classes SCUnidirectionalList and SCBidirectionalList)

- (BOOL) isOrderedSet
readnonatomicassign

A boolean value that indicates whether a receiving instance is an ordered set of any supported type

- (BOOL) isQueue
readnonatomicassign

A boolean value that indicates whether a receiving instance is a queue (class SCQueue instance)

- (BOOL) isSet
readnonatomicassign

A boolean value that indicates whether a receiving instance is a set of any supported type

- (BOOL) isSortable
readnonatomicassign

A boolean value that indicates whether a receiving instance is a sortable collection (array or ordered set of any supported type)

- (BOOL) isStack
readnonatomicassign

A boolean value that indicates whether a receiving instance is a stack (class SCStack instance)

- (NSString*) name
readnonatomicretain

Name of the collection

- (NSEnumerator*) objectEnumerator
readnonatomicassign

Enumerate object that lets you access each object within collection

- (SCOrderedSet*) orderedSet
readnonatomicassign

Ordered set with the all collection objects

- (SCQueue*) queue
readnonatomicassign

Queue with the all collection objects

- (BOOL) readOnly
readnonatomicassign

Determines whether the collection is in read only mode

- (NSEnumerator*) reverseObjectEnumerator
readnonatomicassign

Enumerate object that lets you access each object within collection, in reverse order

- (SCSet*) set
readnonatomicassign

Set with the all collection objects

- (SCStack*) stack
readnonatomicassign

Stack with the all collection objects

- (SCUnidirectionalList*) unidirectionalList
readnonatomicassign

Unidirectional list with the all collection objects


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