Samond Classes Library 1.2.6-STABLE build 219
|
Standard class NSDictionary functionality extending category. More...
#import <NSDictionary+SCDictionary.h>
Creating Dictionaries | |
(instancetype) | + dictionaryWithCoder: |
(instancetype) | + dictionaryWithContentsOfSerializedFile: |
(instancetype) | + dictionaryWithDataDictionary: |
(instancetype) | + dictionaryWithDataDictionaryFromFile: |
(instancetype) | + dictionaryWithStream: |
(instancetype) | + dictionaryWithFileStream: |
(instancetype) | + dictionaryWithData: |
(instancetype) | + dictionaryWithContentsOfURLString: |
(instancetype) | + dictionaryWithCollection: |
Initializing Dictionaries | |
(instancetype) | - initWithCollection: |
Protocol SCCollection Implementation | |
NSString * | name |
BOOL | empty |
BOOL | readOnly |
id< SCCollectionDelegate > | delegate |
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 |
Finding Objects and Keys in a Dictionary | |
(BOOL) | - containsObject: |
(BOOL) | - containsObjects: |
(BOOL) | - containsCollection: |
(BOOL) | - containsAnyObject: |
(BOOL) | - containsAnyObjectFromCollection: |
(BOOL) | - containsKey: |
(BOOL) | - containsKeys: |
(BOOL) | - containsKeysFromCollection: |
(BOOL) | - containsAnyKey: |
(BOOL) | - containsAnyKeyFromCollection: |
Converting Dictionaries | |
SCArray * | array |
SCSet * | set |
SCOrderedSet * | orderedSet |
SCDictionary * | dictionary |
SCStack * | stack |
SCQueue * | queue |
SCUnidirectionalList * | unidirectionalList |
SCBidirectionalList * | bidirectionalList |
NSArray * | foundationArray |
NSSet * | foundationSet |
NSOrderedSet * | foundationOrderedSet |
NSDictionary * | foundationDictionary |
Accessing Keys and Values | |
(id) | - getObjectForKey: |
Comparing Dictionaries | |
(BOOL) | - isEqualToCollection: |
Deriving New Dictionaries | |
(NSDictionary *) | - dictionaryByAddingObject:forKey: |
(NSDictionary *) | - dictionaryByAddingObject: |
(NSDictionary *) | - dictionaryByAddingObjects:forKeys: |
(NSDictionary *) | - dictionaryByAddingObjects: |
(NSDictionary *) | - dictionaryByAddingObjectsAndKeys: |
(NSDictionary *) | - dictionaryByAddingCollection: |
(NSDictionary *) | - dictionaryByAddingObjectsFromArray: |
(NSDictionary *) | - dictionaryByAddingArray: |
(NSDictionary *) | - dictionaryByAddingEntriesFromDictionary: |
(NSDictionary *) | - dictionaryByAddingDictionary: |
Standard class NSDictionary functionality extending category.
Implements the additional methods for add into the standard class NSDictionary the enhanced functionality.
- (BOOL) containsAnyKey: | (id) | key | |
, | NS_REQUIRES_NIL_TERMINATION | ||
Returns a boolean value that indicates whether the receiving dictionary contains objects for at least one key from the specified list.
key | - the first key to find within the receiving dictionary |
... | - a comma-separated list of additional keys, ending with nil pointer |
NS_REQUIRES_NIL_TERMINATION | - the mandatory nil pointer |
- (BOOL) containsAnyKeyFromCollection: | (id<SCCollection>) | collection |
Returns a boolean value that indicates whether the receiving dictionary contains objects for at least one key from the specified collection of any supported type.
collection | - the collection with the required keys |
- (BOOL) containsAnyObject: | (id<SCCollectioning>) | object | |
, | NS_REQUIRES_NIL_TERMINATION | ||
Returns a boolean value that indicates whether the receiving dictionary contains at least one object from the specified list.
object | - the first object to find within the receiving dictionary |
... | - a comma-separated list of additional objects, ending with nil pointer |
NS_REQUIRES_NIL_TERMINATION | - the mandatory nil pointer |
Reimplemented from <SCCollection>.
- (BOOL) containsAnyObjectFromCollection: | (id<SCCollection>) | collection |
Returns a boolean value that indicates whether the receiving dictionary contains at least one object from the specified collection of any supported type.
collection | - the collection with the required objects |
Reimplemented from <SCCollection>.
- (BOOL) containsCollection: | (id<SCCollection>) | collection |
Returns a boolean value that indicates whether the receiving dictionary contains all objects from the specified collection of any supported type.
collection | - the collection with the required objects |
Reimplemented from <SCCollection>.
- (BOOL) containsKey: | (id) | key |
Returns a boolean value that indicates whether the receiving dictionary contains an object for a specified key.
key | - the required key |
- (BOOL) containsKeys: | (id) | key | |
, | NS_REQUIRES_NIL_TERMINATION | ||
Returns a boolean value that indicates whether the receiving dictionary contains objects for all keys from the specified list.
key | - the first key to find within the receiving dictionary |
... | - a comma-separated list of additional keys, ending with nil pointer |
NS_REQUIRES_NIL_TERMINATION | - the mandatory nil pointer |
- (BOOL) containsKeysFromCollection: | (id<SCCollection>) | collection |
Returns a boolean value that indicates whether the receiving dictionary contains objects for all keys from the specified collection of any supported type.
collection | - the collection with the required keys |
- (BOOL) containsObject: | (id<SCCollectioning>) | object |
Returns a boolean value that indicates whether an equivalent of a given object is present in the receiving dictionary.
object | - the requited object |
Reimplemented from <SCCollection>.
- (BOOL) containsObjects: | (id<SCCollectioning>) | object | |
, | NS_REQUIRES_NIL_TERMINATION | ||
Returns a boolean value that indicates whether the receiving dictionary contains all objects from the specified list.
object | - the first object to find within the receiving dictionary |
... | - a comma-separated list of additional objects, ending with nil pointer |
NS_REQUIRES_NIL_TERMINATION | - the mandatory nil pointer |
Reimplemented from <SCCollection>.
- (NSDictionary *) dictionaryByAddingArray: | (NSArray *) | array |
Returns the new dictionary that contains entries from the receiving dictionary and entries constructed by using objects from a given array with automatic generated keys.
array | - array of objects to add into the new dictionary |
- (NSDictionary *) dictionaryByAddingCollection: | (id<SCCollection>) | collection |
Returns the new dictionary that contains entries from the receiving dictionary and entries from a given collection of any supported type.
collection | - the collection with entries to add into the new dictionary |
SCCollectionException | - collection error detected |
- (NSDictionary *) dictionaryByAddingDictionary: | (NSDictionary *) | dictionary |
Returns the new dictionary that contains entries from the receiving dictionary and entries from a given another dictionary.
dictionary | - the dictionary with entries to add to the new dictionary |
- (NSDictionary *) dictionaryByAddingEntriesFromDictionary: | (NSDictionary *) | dictionary |
Returns the new dictionary that contains entries from the receiving dictionary and entries from a given another dictionary.
dictionary | - the dictionary with entries to add to the new dictionary |
- (NSDictionary *) dictionaryByAddingObject: | (id) | object |
Returns the new dictionary that contains entries from the receiving dictionary and a new entry with a given object and automatic generated key.
object | - the object to add to the dictionary |
- (NSDictionary *) dictionaryByAddingObject: | (id) | object | |
forKey: | (id) | key | |
Returns the new dictionary that contains entries from the receiving dictionary and a new entry with the specified object and key.
object | - the object to add to the dictionary |
key | - the key associated with the specified object |
- (NSDictionary *) dictionaryByAddingObjects: | (id) | object | |
, | NS_REQUIRES_NIL_TERMINATION | ||
Returns the new dictionary that contains entries from the receiving dictionary and a new entries constructed by using objects from a given list with automatic generated keys.
object | - the first object to add into the dictionary |
... | - a comma-separated list of additional objects, ending with nil pointer |
NS_REQUIRES_NIL_TERMINATION | - the mandatory nil pointer |
- (NSDictionary *) dictionaryByAddingObjects: | (NSArray *) | objects | |
forKeys: | (NSArray *) | keys | |
Returns the new dictionary that contains entries from the receiving dictionary and a new entries constructed from the contents of a given array of keys and the specified array of objects.
objects | - an array containing the objects for the new entries |
keys | - an array containing the keys for the new entries |
- (NSDictionary *) dictionaryByAddingObjectsAndKeys: | (id) | object | |
, | NS_REQUIRES_NIL_TERMINATION | ||
Returns the new dictionary that contains entries from the receiving dictionary and a new entries constructed from the specified set of objects and keys.
object | - the first object to add to the new dictionary |
... | - first the key for the first object, then a null-terminated list of alternating objects and keys |
NS_REQUIRES_NIL_TERMINATION | - the mandatory nil pointer |
- (NSDictionary *) dictionaryByAddingObjectsFromArray: | (NSArray *) | array |
Returns the new dictionary that contains entries from the receiving dictionary and entries constructed by using objects from a given array with automatic generated keys.
array | - array of objects to add into the new dictionary |
+ (instancetype) dictionaryWithCoder: | (NSCoder *) | coder |
Returns a dictionary created by using the specified coder.
coder | - the source coder |
+ (instancetype) dictionaryWithCollection: | (id<SCCollection>) | collection |
Returns a dictionary created by using the specified existing collection of any supported type.
collection | - the source collection |
SCCollectionException | - collection error detected |
+ (instancetype) dictionaryWithContentsOfSerializedFile: | (NSString *) | path |
Returns a dictionary created by using the content of serialized file with the specified path.
path | - the path to the source serialized file |
+ (instancetype) dictionaryWithContentsOfURLString: | (NSString *) | urlString |
Returns a dictionary created by using the data from the URL with the specified string.
urlString | - the string of the source URL |
+ (instancetype) dictionaryWithData: | (NSData *) | data |
Returns a dictionary created by using the specified data object.
data | - the source data object |
+ (instancetype) dictionaryWithDataDictionary: | (NSDictionary *) | dictionary |
Returns a dictionary created by using the specified data dictionary.
dictionary | - the source data dictionary |
+ (instancetype) dictionaryWithDataDictionaryFromFile: | (NSString *) | path |
Returns a dictionary created by using the data dictionary from the specified file.
path | - the path to the source file with the data dictionary |
+ (instancetype) dictionaryWithFileStream: | (NSString *) | path |
Returns a dictionary created by using the data from the file stream with the specified path.
path | - the path to the source file stream |
SCStreamException | - stream error detected |
SCSystemException | - system error detected |
+ (instancetype) dictionaryWithStream: | (SCStream *) | stream |
Returns a dictionary created by using the data from the specified stream.
stream | - the source stream |
SCStreamException | - stream error detected |
SCSystemException | - system error detected |
- (id) getObjectForKey: | (NSString *) | key |
Returns stored in a data dictionary format object associated with a given key.
key | - the key of the required object |
SCCollectionException | - collection error detected |
- (instancetype) initWithCollection: | (id<SCCollection>) | collection |
Initializes a dictionary using the specified existing collection of any supported type.
collection | - the source collection |
SCCollectionException | - collection error detected |
Reimplemented from <SCCollection>.
- (BOOL) isEqualToCollection: | (id<SCCollection>) | collection |
Compares the receiving dictionary to the specified collection of any supported type.
collection | - a collection |
SCCollectionException | - collection error detected |
Reimplemented from <SCCollection>.
|
readnonatomicassign |
An array with the all objects from the receiving dictionary
|
readnonatomicassign |
A bidirectional list with the all objects from the receiving dictionary
|
readnonatomicassign |
A type of the collection
|
readnonatomicretain |
A dictionary delegate object
|
readnonatomicassign |
A dictionary with the all objects from the receiving dictionary
|
readnonatomicassign |
Determines whether the dictionary is empty or contains at least one object
|
readnonatomicassign |
A foundation array with the all objects from the receiving dictionary
|
readnonatomicassign |
A foundation dictionary with all objects from the receiving dictionary
|
readnonatomicassign |
A foundation ordered set with the all objects from the receiving dictionary
|
readnonatomicassign |
A foundation set with the all objects from the receiving dictionary
|
readnonatomicassign |
A boolean value that indicates whether a receiving instance is an array of any supported type
|
readnonatomicassign |
A boolean value that indicates whether a receiving instance is a collection of any supported type
|
readnonatomicassign |
A boolean value that indicates whether a receiving instance is a dictionary of any supported type
|
readnonatomicassign |
A boolean value that indicates whether a receiving instance is a standard array (instances of the classes NSArray and NSMutableArray)
|
readnonatomicassign |
A boolean value that indicates whether a receiving instance is a standard Objective-C collection
|
readnonatomicassign |
A boolean value that indicates whether a receiving instance is a standard dictionary (instances of the classes NSDictionary and NSMutableDictionary)
|
readnonatomicassign |
A boolean value that indicates whether a receiving instance is a standard orderde set (instances of the classes NSOrderedSet and NSMutableOrderedSet)
|
readnonatomicassign |
A boolean value that indicates whether a receiving instance is a standard set (instances of the classes NSSet and NSMutableSet)
|
readnonatomicassign |
A boolean value that indicates whether a receiving instance is a library array (class SCArray instance)
|
readnonatomicassign |
A boolean value that indicates whether a receiving instance is a library collection
|
readnonatomicassign |
A boolean value that indicates whether a receiving instance is a library dictionary (class SCDictionary instance)
|
readnonatomicassign |
A boolean value that indicates whether a receiving instance is a library ordered set (class SCOrderedSet instance)
|
readnonatomicassign |
A boolean value that indicates whether a receiving instance is a library set (class SCSet instance)
|
readnonatomicassign |
A boolean value that indicates whether a receiving instance is a list (instances of the classes SCUnidirectionalList and SCBidirectionalList)
|
readnonatomicassign |
A boolean value that indicates whether a receiving instance is an ordered set of any supported type
|
readnonatomicassign |
A boolean value that indicates whether a receiving instance is a queue (class SCQueue instance)
|
readnonatomicassign |
A boolean value that indicates whether a receiving instance is a set of any supported type
|
readnonatomicassign |
A boolean value that indicates whether a receiving instance is a sortable collection (array or ordered set of any supported type)
|
readnonatomicassign |
A boolean value that indicates whether a receiving instance is a stack (class SCStack instance)
|
readnonatomicretain |
Name of the dictionary
|
readnonatomicassign |
An ordered set with the all objects from the receiving dictionary
|
readnonatomicassign |
A queue with the all objects from the receiving dictionary
|
readnonatomicassign |
Determines whether the dictionary is in read only mode
|
readnonatomicassign |
A set with the all objects from the receiving dictionary
|
readnonatomicassign |
A stack with the all objects from the receiving dictionary
|
readnonatomicassign |
An unidirectional list with the all objects from the receiving dictionary