Samond Classes Library 1.2.6-STABLE build 219
List of all members
SCDictionary Class Reference

Dictionary class. More...

#import <SCDictionary.h>

+ Inheritance diagram for SCDictionary:

Creating Dictionaries

(instancetype) + dictionaryWithCoder:
 
(instancetype) + dictionaryWithContentsOfSerializedFile:
 
(instancetype) + dictionaryWithDataDictionary:
 
(instancetype) + dictionaryWithDataDictionaryFromFile:
 
(instancetype) + dictionaryWithStream:
 
(instancetype) + dictionaryWithFileStream:
 
(instancetype) + dictionaryWithData:
 
(instancetype) + dictionaryWithContentsOfFile:
 
(instancetype) + dictionaryWithContentsOfURL:
 
(instancetype) + dictionaryWithContentsOfURLString:
 
(instancetype) + dictionaryWithName:
 
(instancetype) + dictionaryWithObject:forKey:
 
(instancetype) + dictionaryWithObject:
 
(instancetype) + dictionaryWithObjects:forKeys:
 
(instancetype) + dictionaryWithObjects:
 
(instancetype) + dictionaryWithObjectsAndKeys:
 
(instancetype) + dictionaryWithCollection:
 
(instancetype) + dictionaryWithDictionary:
 
(instancetype) + dictionary
 

Initializing Dictionaries

(instancetype) - initWithName:
 
(instancetype) - initWithObject:forKey:
 
(instancetype) - initWithObject:
 
(instancetype) - initWithObjects:forKeys:
 
(instancetype) - initWithObjects:
 
(instancetype) - initWithObjectsAndKeys:
 
(instancetype) - initWithCollection:
 
(instancetype) - initWithDictionary:
 
(instancetype) - init
 

Copying Dictionaries

(void) - setDictionary:
 

Comparing Dictionaries

(BOOL) - isEqualToDictionary:
 

Deriving New Dictionaries

(SCDictionary *) - dictionaryByAddingObject:forKey:
 
(SCDictionary *) - dictionaryByAddingObject:
 
(SCDictionary *) - dictionaryByAddingObjects:forKeys:
 
(SCDictionary *) - dictionaryByAddingObjects:
 
(SCDictionary *) - dictionaryByAddingObjectsAndKeys:
 
(SCDictionary *) - dictionaryByAddingCollection:
 
(SCDictionary *) - dictionaryByAddingObjectsFromArray:
 
(SCDictionary *) - dictionaryByAddingArray:
 
(SCDictionary *) - dictionaryByAddingEntriesFromDictionary:
 
(SCDictionary *) - dictionaryByAddingDictionary:
 

Adding and Changing Objects

(void) - setObject:forKey:
 
(void) - setObjects:forKeys:
 
(void) - setObjectsAndKeys:
 
(void) - setValue:forKey:
 
(void) - setValues:forKeys:
 
(void) - setValuesAndKeys:
 
(void) - addObjectsFromArray:
 
(void) - addArray:
 
(void) - addEntriesFromDictionary:
 
(void) - addDictionary:
 
(void) - addObjects:forKeys:
 
(void) - addObjectsAndKeys:
 
(void) - setObject:forKeyedSubscript:
 

Removing Objects

(void) - removeObjectForKey:
 
(void) - removeObjectsForKeys:
 

Querying a Dictionary

SCArrayallKeys
 
SCArrayallValues
 
(SCArray *) - allKeysForObject:
 
(id) - objectForKey:
 
(id) - objectForKeyedSubscript:
 
(id) - valueForKey:
 

Finding Objects and Keys in a Dictionary

(BOOL) - containsObjectForKey:
 
(BOOL) - containsStringForKey:
 
(BOOL) - containsNumberForKey:
 
(BOOL) - containsAnyObjectForKeys:
 
(BOOL) - containsAllObjectsForKeys:
 
(BOOL) - containsKey:
 
(BOOL) - containsKeys:
 
(BOOL) - containsKeysFromCollection:
 
(BOOL) - containsAnyKey:
 
(BOOL) - containsAnyKeyFromCollection:
 

Objects Enumerators

NSEnumerator * keyEnumerator
 

Additional Inherited Members

- Instance Methods inherited from SCCollection
(void) - setCollection:
 
(void) - setObject:
 
(void) - setObjects:
 
(BOOL) - isEqualToCollection:
 
(BOOL) - isEqual:
 
(void) - enumerate
 
(void) - reverseEnumerateWithDelegate:
 
(void) - reverseEnumerate
 
(void) - addObjects:
 
(void) - addCollection:
 
(void) - removeObjectsWithClassName:
 
(void) - removeCollection:
 
(void) - removeObjects:
 
(BOOL) - containsObjects:
 
(BOOL) - containsCollection:
 
(BOOL) - containsAnyObject:
 
(BOOL) - containsAnyObjectFromCollection:
 
- Instance Methods inherited from SCObject
(instancetype) - initWithContentsOfSerializedFile:
 
(BOOL) - writeContentsToSerializedFile:
 
(instancetype) - initWithDataDictionaryFromFile:
 
(void) - writeToDataDictionaryFile:atomically:
 
(void) - writeToDataDictionaryFile:
 
(NSDictionary *) - dataDictionary
 
(instancetype) - initWithFileStream:
 
(void) - writeToFileStream:
 
(void) - appendToFileStream:
 
(instancetype) - initWithData:
 
(instancetype) - initWithContentsOfFile:
 
(instancetype) - initWithContentsOfURL:
 
(instancetype) - initWithContentsOfURLString:
 
(BOOL) - writeToFile:
 
(BOOL) - writeToURL:
 
(BOOL) - writeToURLString:
 
(NSData *) - data
 
- Instance Methods inherited from <SCMutableCollection>
- Instance Methods inherited from <SCCollection>
- Instance Methods inherited from <SCKeyedCollection>
- Instance Methods inherited from <SCMutableKeyedCollection>
- Class Methods inherited from SCCollection
(BOOL) + isCollectionClass:
 
(BOOL) + isLibraryCollectionClass:
 
(BOOL) + isFoundationCollectionClass:
 
(BOOL) + isArrayClass:
 
(BOOL) + isLibraryArrayClass:
 
(BOOL) + isFoundationArrayClass:
 
(BOOL) + isSetClass:
 
(BOOL) + isLibrarySetClass:
 
(BOOL) + isFoundationSetClass:
 
(BOOL) + isOrderedSetClass:
 
(BOOL) + isLibraryOrderedSetClass:
 
(BOOL) + isFoundationOrderedSetClass:
 
(BOOL) + isDictionaryClass:
 
(BOOL) + isLibraryDictionaryClass:
 
(BOOL) + isFoundationDictionaryClass:
 
(BOOL) + isStackClass:
 
(BOOL) + isQueueClass:
 
(BOOL) + isListClass:
 
(BOOL) + isSortableClass:
 
(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:
 
- Properties inherited from SCCollection
NSString * name
 
SCIndex count
 
BOOL empty
 
BOOL readOnly
 
id< SCCollectionDelegatedelegate
 
NSString * typeName
 
NSEnumerator * objectEnumerator
 
NSEnumerator * reverseObjectEnumerator
 
SCArrayarray
 
SCSetset
 
SCOrderedSetorderedSet
 
SCDictionarydictionary
 
SCStackstack
 
SCQueuequeue
 
SCUnidirectionalListunidirectionalList
 
SCBidirectionalListbidirectionalList
 
NSArray * foundationArray
 
NSSet * foundationSet
 
NSOrderedSet * foundationOrderedSet
 
NSDictionary * foundationDictionary
 
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
 
- Properties inherited from SCObject
NSString * className
 
- 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

Dictionary class.

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

Implements the collection which uses the keys for access to the objects. Class also supports the data trees.
Class instances can thrown the following exceptions:

Method Documentation

- (void) addArray: (SCArray *)  array

Adds into the receiving dictionary objects from a given array.

Parameters
array- the array with objects to add into the dictionary
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- addObjectsFromArray:
- (void) addDictionary: (SCDictionary *)  dictionary

Adds to the receiving dictionary the entries from a given another dictionary.

Parameters
dictionary- the dictionary from which to add entries
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- addEntriesFromDictionary:
- (void) addEntriesFromDictionary: (SCDictionary *)  dictionary

Adds to the receiving dictionary the entries from a given another dictionary.

Parameters
dictionary- the dictionary from which to add entries
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- addDictionary:
- (void) addObjects: (id<SCCollection>)  objects
forKeys: (id<SCCollection>)  keys 

Adds to the receiving dictionary the entries constructed from the contents of a given collection of keys and the specified collection of objects.

Parameters
objects- a collection containing the objects for the new entries
keys- a collection containing the keys for the new entries
Since
version 1.2.3
- (void) addObjectsAndKeys: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Adds to the receiving dictionary the 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
Since
version 1.2.3
- (void) addObjectsFromArray: (SCArray *)  array

Adds into the receiving dictionary objects from a given array.

Parameters
array- the array with objects to add into the dictionary
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- addArray:
- (SCArray *) allKeysForObject: (id<SCCollectioning>)  object

Returns a new array containing the keys corresponding to all occurrences of a given object in the dictionary.

Parameters
object- the object to look for in the dictionary
Returns
A new array containing the keys corresponding to all occurrences of the specified object in the dictionary
- (BOOL) containsAllObjectsForKeys: (id<SCCollection>)  keys

Returns a boolean value that indicates whether an objects for all keys from the specified collection of any supported type are present in the receiving dictionary.

Parameters
keys- the collection with keys
Returns
YES if all objects are present in the dictionary, otherwise NO
- (BOOL) containsAnyKey: (NSString *)  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) containsAnyObjectForKeys: (id<SCCollection>)  keys

Returns a boolean value that indicates whether an object for at least one key from the specified collection of any supported type is present in the receiving dictionary.

Parameters
keys- the collection with keys
Returns
YES if at least one object is present in the dictionary, otherwise NO
- (BOOL) containsKey: (NSString *)  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: (NSString *)  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) containsNumberForKey: (NSString *)  key

Returns a boolean value that indicates whether a number for the given key is present in the receiving dictionary.

Parameters
key- the key for the desired number
Returns
YES if a number for the given key is present in the dictionary, otherwise NO
- (BOOL) containsObjectForKey: (NSString *)  key

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

Parameters
key- the key for the desired object
Returns
YES if an object for the given key is present in the dictionary, otherwise NO
- (BOOL) containsStringForKey: (NSString *)  key

Returns a boolean value that indicates whether a string for the given key is present in the receiving dictionary.

Parameters
key- the key for the desired string
Returns
YES if a string for the given key is present in the dictionary, otherwise NO
+ (instancetype) dictionary

Creates and returns an unnamed empty dictionary.

Returns
A created dictionary
- (SCDictionary *) dictionaryByAddingArray: (SCArray *)  array

Returns the new dictionary that contains entries from the receiving dictionary and entries constructed by using objects from a given array.

Parameters
array- an array of objects to add to the new dictionary
Returns
A dictionary with entries from the receiving dictionary and objects from a given array
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- dictionaryByAddingObjectsFromArray:
- (SCDictionary *) dictionaryByAddingCollection: (id<SCCollection>)  collection

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

Parameters
collection- the collection of objects to add to the new dictionary
Returns
A dictionary with entries from the receiving dictionary and objects from the specified collection
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
- (SCDictionary *) dictionaryByAddingDictionary: (SCDictionary *)  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 dictionary
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- dictionaryByAddingEntriesFromDictionary:
- (SCDictionary *) dictionaryByAddingEntriesFromDictionary: (SCDictionary *)  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 dictionary
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
See also
- dictionaryByAddingDictionary:
- (SCDictionary *) dictionaryByAddingObject: (id<SCCollectioning>)  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
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
- (SCDictionary *) dictionaryByAddingObject: (id<SCCollectioning>)  object
forKey: (NSString *)  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 new 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
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
- (SCDictionary *) dictionaryByAddingObjects: (id<SCCollectioning>)  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
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
- (SCDictionary *) dictionaryByAddingObjects: (id<SCCollection>)  objects
forKeys: (id<SCCollection>)  keys 

Returns the new dictionary that contains entries from the receiving dictionary and a new entries constructed from the contents of a given collection of keys and the specified collection of objects.

Parameters
objects- a collection containing the objects for the new entries
keys- a collection 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 collections
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
- (SCDictionary *) dictionaryByAddingObjectsAndKeys: (id<SCCollectioning>)  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
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.3
- (SCDictionary *) dictionaryByAddingObjectsFromArray: (SCArray *)  array

Returns the new dictionary that contains entries from the receiving dictionary and entries constructed by using objects from a given array.

Parameters
array- an array of objects to add to the new dictionary
Returns
A dictionary with entries from the receiving dictionary and objects from a given array
Exceptions
SCCollectionException- collection error detected
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 objects from the specified collection of any supported type.

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

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

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

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

Parameters
path- the path to the source serialized file
Returns
A created dictionary
+ (instancetype) dictionaryWithContentsOfURL: (NSURL *)  url

Returns a dictionary created by using the specified URL.

Parameters
url- the source URL
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 data dictionary file
Returns
A created dictionary
+ (instancetype) dictionaryWithDictionary: (SCDictionary *)  dictionary

Creates and returns a dictionary containing keys and objects from another given dictionary.

Parameters
dictionary- a dictionary containing the keys and values with which to initialize the new dictionary
Returns
A new dictionary containing the keys and values found in the specified dictionary
Exceptions
SCCollectionException- collection error detected
+ (instancetype) dictionaryWithFileStream: (NSString *)  path

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

Parameters
path- the path of the source file stream
Returns
A created dictionary
Exceptions
SCStreamException- stream error detected
SCSystemException- system error detected
+ (instancetype) dictionaryWithName: (NSString *)  name

Returns an empty dictionary created by using the specified dictionary name.

Parameters
name- the dictionary name
Returns
A created dictionary
+ (instancetype) dictionaryWithObject: (id<SCCollectioning>)  object

Creates and returns a dictionary containing a given object with the automatic generated key.

Parameters
object- the object to adding into the dictionary
Returns
A new dictionary containing a single object
+ (instancetype) dictionaryWithObject: (id<SCCollectioning>)  object
forKey: (NSString *)  key 

Creates and returns a dictionary containing a given key and object.

Parameters
object- the object corresponding to the specified key
key- the key for the specified object
Returns
A new dictionary containing a single object for a single key
+ (SCDictionary *) dictionaryWithObjects: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Creates and returns a dictionary containing objects from the specified nil terminated list and automatic generated keys.

Parameters
object- the first object to add to the new dictionary
...- other objects to add to the new dictionary
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
A new dictionary containing the specified objects
+ (instancetype) dictionaryWithObjects: (id<SCCollection>)  objects
forKeys: (id<SCCollection>)  keys 

Creates and returns a dictionary containing entries constructed from the contents of a collection of keys and a collection of objects.

Parameters
objects- a collection containing the objects for the new dictionary
keys- a collection containing the keys for the new dictionary
Returns
A new dictionary containing entries constructed from the contents of the specified collections
+ (instancetype) dictionaryWithObjectsAndKeys: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Creates and returns a dictionary containing 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 new dictionary
+ (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
- (instancetype) init

Initializes an empty unnamed dictionary.

Returns
A newly initialized dictionary

Reimplemented from SCCollection.

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

Initializes a newly allocated dictionary with objects from the specified collection with automatic generated keys.

Parameters
collection- a collection with objects to add to the new dictionary
Returns
An initialized dictionary with the objects from a given collection
Exceptions
SCCollectionException- collection error detected

Reimplemented from SCCollection.

- (instancetype) initWithDictionary: (SCDictionary *)  dictionary

Initializes a newly allocated dictionary by placing in it the keys and objects contained in another given dictionary.

Attention
Designed initializer
Parameters
dictionary- a dictionary containing the keys and objects with which to initialize the new dictionary
Returns
An initialized dictionary containing the keys and objects found in the specified source dictionary
Exceptions
SCCollectionException- collection error detected
- (instancetype) initWithName: (NSString *)  name

Initializes an empty dictionary using the specified dictionary name.
Designed initializer

Parameters
name- the dictionary name
Returns
A newly initialized dictionary

Reimplemented from SCCollection.

- (instancetype) initWithObject: (id<SCCollectioning>)  object

Initializes a newly allocated dictionary containing a given object with the automatic generated key.

Parameters
object- the object to adding into the dictionary
Returns
An initialized dictionary containing a single object
- (instancetype) initWithObject: (id<SCCollectioning>)  object
forKey: (NSString *)  key 

Initializes a newly allocated dictionary containing a given key and object.

Parameters
object- the object corresponding to the specified key
key- the key for the specified object
Returns
An initialized dictionary containing a single object for a single key
- (instancetype) initWithObjects: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Initializes a newly allocated dictionary containing objects from the specified nil terminated list and automatic generated keys.

Parameters
object- the first object to add to the new dictionary
...- other objects to add to the new dictionary
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
An initialized dictionary containing the specified objects
- (instancetype) initWithObjects: (id<SCCollection>)  objects
forKeys: (id<SCCollection>)  keys 

Initializes a newly allocated dictionary containing entries constructed from the contents of a collection of keys and a collection of objects.

Parameters
objects- a collection containing the objects for the new dictionary
keys- a collection containing the keys for the new dictionary
Returns
An initialized dictionary containing entries constructed from the contents of the specified collections
- (instancetype) initWithObjectsAndKeys: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Initializes a newly allocated dictionary with entries constructed from the specified set of objects and keys.

Parameters
object- the first object to add to the new dictionary
...- first key for the first object, then a null-terminated list of alternating objects and keys
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
An initialized dictionary
- (BOOL) isEqualToDictionary: (SCDictionary *)  dictionary

Returns a boolean value that indicates whether the settings and contents of the receiving dictionary are equal to the settings and content of another given dictionary.

Parameters
dictionary- the dictionary with which to compare the receiving dictionary
Returns
YES if the settings and contents of the specified dictionary are equal to the settings and contents of the receiving dictionary, otherwise NO
- (id) objectForKey: (NSString *)  key

Returns the object associated with a given key.

Parameters
key- the key for which to return the corresponding object
Returns
The object associated with the specified key or nil if no object is associated with the key
See also
- valueForKey:

Reimplemented from <SCKeyedCollection>.

- (id) objectForKeyedSubscript: (NSString *)  key

Returns the value associated with a given key.

Parameters
key- the key for which to return the corresponding value
Returns
The value associated with a given key or nil if no value is associated with a key
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.5

Reimplemented from <SCKeyedCollection>.

- (void) removeObjectForKey: (NSString *)  key

Removes a given key and its associated object from the receiving dictionary.

Parameters
key- the key to remove
Exceptions
SCCollectionException- collection error detected

Reimplemented from <SCMutableKeyedCollection>.

- (void) removeObjectsForKeys: (SCArray *)  keys

Removes from the receiving dictionary entries specified specified by elements in a given array.

Parameters
keys- an array of objects specifying the keys to remove
Exceptions
SCCollectionException- collection error detected
- (void) setDictionary: (SCDictionary *)  dictionary

Sets the settings and contents of the receiving dictionary to settings and entries in a given dictionary.

Parameters
dictionary- the source dictionary
Exceptions
SCCollectionException- collection error detected
- (void) setObject: (id<SCCollectioning>)  object
forKey: (NSString *)  key 

Adds a given key-object pair to the dictionary.

Parameters
object- the object for the specified key
key- the key for the specified object
Exceptions
SCCollectionException- collection error detected
See also
- setValue:forKey:

Reimplemented from <SCMutableKeyedCollection>.

- (void) setObject: (id<SCCollectioning>)  object
forKeyedSubscript: (NSString *)  key 

Adds a given key-value pair to the dictionary.

Parameters
object- the value for a given key
key- the key for a goven value
Exceptions
SCCollectionException- collection error detected
Since
version 1.2.5

Reimplemented from <SCMutableKeyedCollection>.

- (void) setObjects: (id<SCCollection>)  objects
forKeys: (id<SCCollection>)  keys 

Adds a key-object pairs from the specified collection of the objects and a given collection of the keys.

Parameters
objects- the collection of the objects
keys- the collection of the keys
Exceptions
SCCollectionException- collection error detected
- (void) setObjectsAndKeys: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Adds into the receiving dictionary entries cotsructed from the specified set of objects and keys.

Parameters
object- the first object to add to the 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
Exceptions
SCCollectionException- collection error detected
- (void) setValue: (id<SCCollectioning>)  value
forKey: (NSString *)  key 

Adds a given key-value pair to the dictionary.

Parameters
value- the value for the specified key
key- the key for the specified value
Exceptions
SCCollectionException- collection error detected
See also
- setObject:forKey:

Reimplemented from <SCMutableKeyedCollection>.

- (void) setValues: (id<SCCollection>)  values
forKeys: (id<SCCollection>)  keys 

Adds a key-value pairs from the specified collection of the values and a given collection of the keys.

Parameters
values- the collection of the values
keys- the collection of the keys
Exceptions
SCCollectionException- collection error detected
- (void) setValuesAndKeys: (id<SCCollectioning>)  object
,   NS_REQUIRES_NIL_TERMINATION 

Adds into the receiving dictionary entries cotsructed from the specified set of values and keys.

Parameters
object- the first value to add to the dictionary
...- first the key for the first value, then a null-terminated list of alternating values and keys
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Exceptions
SCCollectionException- collection error detected
- (id) valueForKey: (NSString *)  key

Returns the value associated with a given key.

Parameters
key- the key for which to return the corresponding value
Returns
The value associated with a given key or nil if no value is associated with the key
See also
- objectForKey:

Reimplemented from <SCKeyedCollection>.

Property Documentation

- (SCArray *) allKeys
readnonatomicassign

An array containing the all keys in the dictionary, or an empty array if the dictionary has no entries

- (SCArray *) allValues
readnonatomicassign

An array containing the all values in the dictionary, or an empty array if the dictionary has no entries

- (NSEnumerator *) keyEnumerator
readnonatomicassign

An enumerator object that lets you access each key in the dictionary


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