Samond Classes Library 1.2.6-STABLE build 219
List of all members
NSDictionary(SCDictionary) Category Reference

Standard class NSDictionary functionality extending category. More...

#import <NSDictionary+SCDictionary.h>

+ Inheritance diagram for NSDictionary(SCDictionary):

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< SCCollectionDelegatedelegate
 
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

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

Additional Inherited Members

- Instance Methods inherited from <SCCollection>
(NSUInteger) - countByEnumeratingWithState:objects:count:
 
- Instance Methods inherited from <SCKeyedCollection>
(id) - objectForKey:
 
(id) - objectForKeyedSubscript:
 
(id) - valueForKey:
 
- Properties inherited from <SCCollection>
NSString * name
 
SCIndex count
 
BOOL empty
 
BOOL readOnly
 
id< SCCollectionDelegatedelegate
 
SCArrayarray
 
SCSetset
 
SCOrderedSetorderedSet
 
SCDictionarydictionary
 
SCStackstack
 
SCQueuequeue
 
SCUnidirectionalListunidirectionalList
 
SCBidirectionalListbidirectionalList
 
NSArray * foundationArray
 
NSSet * foundationSet
 
NSOrderedSet * foundationOrderedSet
 
NSDictionary * foundationDictionary
 
NSEnumerator * objectEnumerator
 
NSEnumerator * reverseObjectEnumerator
 
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
 

Detailed Description

Standard class NSDictionary functionality extending category.

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

Implements the additional methods for add into the standard class NSDictionary the enhanced functionality.

Method Documentation

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

Parameters
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
Returns
YES if the receiving dictionary contains objects for at least one key from the list, otherwise NO
- (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.

Parameters
collection- the collection with the required keys
Returns
YES if the receiving dictionary contains obejcts for at least one key from the specified collection, otherwise NO
- (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.

Parameters
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
Returns
YES if the receiving dictionary contains at least one object from the list, otherwise NO

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.

Parameters
collection- the collection with the required objects
Returns
YES if the receiving dictionary contains at least one object from the specified collection, otherwise NO

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.

Parameters
collection- the collection with the required objects
Returns
YES if the all required objects are present in the receiving dictionary, otherwise NO

Reimplemented from <SCCollection>.

- (BOOL) containsKey: (id)  key

Returns a boolean value that indicates whether the receiving dictionary contains an object for a specified key.

Parameters
key- the required key
Returns
YES if a dictionary contains an object for a given key, otherwise NO
- (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.

Parameters
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
Returns
YES if objects for all keys are present in the receiving dictiomary, otherwise NO
- (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.

Parameters
collection- the collection with the required keys
Returns
YES if the objects for all required keys are present in the receiving dictionary, otherwise NO
- (BOOL) containsObject: (id<SCCollectioning>)  object

Returns a boolean value that indicates whether an equivalent of a given object is present in the receiving dictionary.

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

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.

Parameters
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
Returns
YES if all objects are present in the receiving dictiomary, otherwise NO

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.

Parameters
array- array of objects to add into the new dictionary
Returns
A dictionary with entries from the receiving dictionary and objects from the specified array
Since
version 1.2.3
See also
- dictionaryByAddingObjectsFromArray:
- (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.

Parameters
collection- the collection with entries to add into the new dictionary
Returns
A dictionary with entreis from the receiving dictionary and entries from the specified collection
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
- (NSDictionary *) dictionaryByAddingDictionary: (NSDictionary *)  dictionary

Returns the new dictionary that contains entries from the receiving dictionary and entries from a given another dictionary.

Parameters
dictionary- the dictionary with entries to add to the new dictionary
Returns
A dictionary with entries from the receiving dictionary and entries from the specified another dictionary
Since
version 1.2.3
See also
- dictionaryByAddingEntriesFromDictionary:
- (NSDictionary *) dictionaryByAddingEntriesFromDictionary: (NSDictionary *)  dictionary

Returns the new dictionary that contains entries from the receiving dictionary and entries from a given another dictionary.

Parameters
dictionary- the dictionary with entries to add to the new dictionary
Returns
A dictionary with entries from the receiving dictionary and entries from the specified another dictionary
Since
version 1.2.3
See also
- dictionaryByAddingDictionary:
- (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.

Parameters
object- the object to add to the dictionary
Returns
A dictionary with entries from the receiving dictionary and a new entry with a given object
Since
version 1.2.3
- (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.

Parameters
object- the object to add to the dictionary
key- the key associated with the specified object
Returns
A dictionary with entries from the receiving dictionary and a new entry with the specified object and key
Since
version 1.2.3
- (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.

Parameters
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
Returns
A dictionary with entries from the receiving dictionary and entries constructed by using objects from the specified list and automatic generated keys
Since
version 1.2.3
- (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.

Parameters
objects- an array containing the objects for the new entries
keys- an array containing the keys for the new entries
Returns
A dictionary with entries from the receiving dictionary and entries constructed by using objects and keys from the specified arrays
Since
version 1.2.3
- (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.

Parameters
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
Returns
A dictionary with entreis from the receiving dictionary and entries from the specified set of objects and keys
Since
version 1.2.3
- (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.

Parameters
array- array of objects to add into the new dictionary
Returns
A dictionary with entries from the receiving dictionary and objects from the specified array
Since
version 1.2.3
See also
- dictionaryByAddingArray:
+ (instancetype) dictionaryWithCoder: (NSCoder *)  coder

Returns a dictionary created by using the specified coder.

Parameters
coder- the source coder
Returns
A created dictionary
+ (instancetype) dictionaryWithCollection: (id<SCCollection>)  collection

Returns a dictionary created by using the specified existing collection of any supported type.

Parameters
collection- the source collection
Returns
A created dictionary
Exceptions
SCCollectionException- collection error detected
+ (instancetype) dictionaryWithContentsOfSerializedFile: (NSString *)  path

Returns a dictionary created by using the content of serialized file with the specified path.

Parameters
path- the path to the source serialized file
Returns
A created dictionary
+ (instancetype) dictionaryWithContentsOfURLString: (NSString *)  urlString

Returns a dictionary created by using the data from the URL with the specified string.

Parameters
urlString- the string of the source URL
Returns
A created dictionary
+ (instancetype) dictionaryWithData: (NSData *)  data

Returns a dictionary created by using the specified data object.

Parameters
data- the source data object
Returns
A created dictionary
+ (instancetype) dictionaryWithDataDictionary: (NSDictionary *)  dictionary

Returns a dictionary created by using the specified data dictionary.

Parameters
dictionary- the source data dictionary
Returns
A created dictionary
+ (instancetype) dictionaryWithDataDictionaryFromFile: (NSString *)  path

Returns a dictionary created by using the data dictionary from the specified file.

Parameters
path- the path to the source file with the data dictionary
Returns
A created dictionary
+ (instancetype) dictionaryWithFileStream: (NSString *)  path

Returns a dictionary created by using the data from the file stream with the specified path.

Parameters
path- the path to the source file stream
Returns
A created dictionary
Exceptions
SCStreamException- stream error detected
SCSystemException- system error detected
+ (instancetype) dictionaryWithStream: (SCStream *)  stream

Returns a dictionary created by using the data from the specified stream.

Parameters
stream- the source stream
Returns
A created dictionary
Exceptions
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.

Parameters
key- the key of the required object
Returns
An object or nil if an object with the specified key does not exists in the receivind dictionary
Exceptions
SCCollectionException- collection error detected
- (instancetype) initWithCollection: (id<SCCollection>)  collection

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

Parameters
collection- the source collection
Returns
A newly initialized dictionary
Exceptions
SCCollectionException- collection error detected

Reimplemented from <SCCollection>.

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

Compares the receiving dictionary to the specified collection of any supported type.

Parameters
collection- a collection
Returns
YES if the contents of the specified collection are equal to the contents of the receiving dictionary, otherwise NO
Exceptions
SCCollectionException- collection error detected

Reimplemented from <SCCollection>.

Property Documentation

- (SCArray *) array
readnonatomicassign

An array with the all objects from the receiving dictionary

- (SCBidirectionalList *) bidirectionalList
readnonatomicassign

A bidirectional list with the all objects from the receiving dictionary

- (SCCollectionType) collectionType
readnonatomicassign

A type of the collection

- (id) delegate
readnonatomicretain

A dictionary delegate object

- (SCDictionary *) dictionary
readnonatomicassign

A dictionary with the all objects from the receiving dictionary

- (BOOL) empty
readnonatomicassign

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

- (NSArray *) foundationArray
readnonatomicassign

A foundation array with the all objects from the receiving dictionary

- (NSDictionary *) foundationDictionary
readnonatomicassign

A foundation dictionary with all objects from the receiving dictionary

- (NSOrderedSet *) foundationOrderedSet
readnonatomicassign

A foundation ordered set with the all objects from the receiving dictionary

- (NSSet *) foundationSet
readnonatomicassign

A foundation set with the all objects from the receiving dictionary

- (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 dictionary

- (SCOrderedSet *) orderedSet
readnonatomicassign

An ordered set with the all objects from the receiving dictionary

- (SCQueue *) queue
readnonatomicassign

A queue with the all objects from the receiving dictionary

- (BOOL) readOnly
readnonatomicassign

Determines whether the dictionary is in read only mode

- (SCSet *) set
readnonatomicassign

A set with the all objects from the receiving dictionary

- (SCStack *) stack
readnonatomicassign

A stack with the all objects from the receiving dictionary

- (SCUnidirectionalList *) unidirectionalList
readnonatomicassign

An unidirectional list with the all objects from the receiving dictionary


The documentation for this category was generated from the following files: