16 #import "OFDictionary.h"
18 OF_ASSUME_NONNULL_BEGIN
44 #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
46 # define ObjectType id
55 + (instancetype)dictionaryWithCapacity: (
size_t)capacity;
62 - (instancetype)
init OF_DESIGNATED_INITIALIZER;
71 - (instancetype)initWithCapacity: (
size_t)capacity OF_DESIGNATED_INITIALIZER;
81 - (void)setObject: (ObjectType)object forKey: (KeyType)key;
94 - (void)setObject: (nullable ObjectType)object forKeyedSubscript: (KeyType)key;
101 - (void)removeObjectForKey: (KeyType)key;
113 - (void)addEntriesFromDictionary:
114 (
OFDictionary OF_GENERIC(KeyType, ObjectType) *)dictionary;
116 #ifdef OF_HAVE_BLOCKS
129 #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
135 OF_ASSUME_NONNULL_END
id(^ OFDictionaryReplaceBlock)(id key, id object)
A block for replacing objects in an OFMutableDictionary.
Definition: OFMutableDictionary.h:30
An abstract class for storing objects in a dictionary.
Definition: OFDictionary.h:80
An abstract class for storing and changing objects in a dictionary.
Definition: OFMutableDictionary.h:44
void removeAllObjects()
Removes all objects.
Definition: OFMutableDictionary.m:157
void makeImmutable()
Converts the mutable dictionary to an immutable dictionary.
Definition: OFMutableDictionary.m:200
instancetype init()
Initializes an already allocated OFMutableDictionary to be empty.
Definition: OFMutableDictionary.m:113