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

Indexed collections protocol. More...

#import <SCCollectionProtocols.h>

Inheritance diagram for <SCIndexedCollection>:
<SCCollection> NSArray(SCArray) NSOrderedSet(SCOrderedSet) SCArray <SCMutableIndexedCollection> SCOrderedSet NSMutableArray(SCMutableArray) NSMutableOrderedSet(SCMutableOrderedSet) SCArray SCOrderedSet

Querying a Collection

(id) - firstObject
 
(id) - lastObject
 
(id) - objectAtIndex:
 

Finding Objects in a Collection

(SCIndex- indexOfObject:
 
(SCIndex- indexOfLastObject
 

Additional Inherited Members

- Instance Methods inherited from <SCCollection>
(NSString *) - name
 
(void) - setName:
 
(SCIndex- count
 
(NSString *) - description
 
(BOOL) - empty
 
(BOOL) - readOnly
 
(instancetype) - initWithCollection:
 
(BOOL) - containsObject:
 
(BOOL) - containsObjects:
 
(BOOL) - containsCollection:
 
(BOOL) - containsAnyObject:
 
(BOOL) - containsAnyObjectFromCollection:
 
(SCArray *) - array
 
(SCSet *) - set
 
(SCOrderedSet *) - orderedSet
 
(SCDictionary *) - dictionary
 
(SCStack *) - stack
 
(SCQueue *) - queue
 
(SCUnidirectionalList *) - unidirectionalList
 
(SCBidirectionalList *) - bidirectionalList
 
(NSArray *) - foundationArray
 
(NSSet *) - foundationSet
 
(NSOrderedSet *) - foundationOrderedSet
 
(NSDictionary *) - foundationDictionary
 
(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
 
(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

Indexed collections protocol.

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

Declares the mandatory methods for support indexed collections.

Method Documentation

- (id) firstObject

Returns the first object from the receiving collection.

Returns
First collection object or nil if the receiving collection is empty.
- (SCIndex) indexOfLastObject

Returns the index of the last object within the receiving collection.

Returns
Index of the last object or SCNotFound if the receiving collection is empty.

Reimplemented in NSOrderedSet(SCOrderedSet), and NSArray(SCArray).

- (SCIndex) indexOfObject: (id< SCCollectioning >)  object

Returns the lowest index whose corresponding collection value is equal to a given object.

Parameters
object- desired object
Returns
Index of object that equals to the specified object, otherwise SCNotFound

Reimplemented in SCArray, and SCOrderedSet.

- (id) lastObject

Returns the last object from the receiving collection.

Returns
Last collection object or nil if the receiving collection is empty.
- (id) objectAtIndex: (SCIndex index

Returns the object located at the specified index.

Parameters
index- required object index
Returns
Object at the specified index
Exceptions
SCCollectionException- collection error detected

Reimplemented in SCArray, and SCOrderedSet.


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