ObjFW  Diff

Differences From Artifact [c87704d4fa]:

To Artifact [72e24e9365]:


94
95
96
97
98
99
100
101

102
103
104
105
106
107
108
109
94
95
96
97
98
99
100

101

102
103
104
105
106
107
108







-
+
-







/**
 * @brief Creates a new OFDictionary with the specified key and object.
 *
 * @param key The key
 * @param object The object
 * @return A new autoreleased OFDictionary
 */
+ (instancetype)dictionaryWithObject: (ObjectType)object
+ (instancetype)dictionaryWithObject: (ObjectType)object forKey: (KeyType)key;
			      forKey: (KeyType)key;

/**
 * @brief Creates a new OFDictionary with the specified keys and objects.
 *
 * @param keys An array of keys
 * @param objects An array of objects
 * @return A new autoreleased OFDictionary
148
149
150
151
152
153
154
155

156
157
158
159
160
161
162
163
147
148
149
150
151
152
153

154

155
156
157
158
159
160
161







-
+
-







 * @brief Initializes an already allocated OFDictionary with the specified key
 *	  and object.
 *
 * @param key The key
 * @param object The object
 * @return An initialized OFDictionary
 */
- (instancetype)initWithObject: (ObjectType)object
- (instancetype)initWithObject: (ObjectType)object forKey: (KeyType)key;
			forKey: (KeyType)key;

/**
 * @brief Initializes an already allocated OFDictionary with the specified keys
 *	  and objects.
 *
 * @param keys An array of keys
 * @param objects An array of objects
192
193
194
195
196
197
198
199

200
201
202
203
204
205
206
207
190
191
192
193
194
195
196

197

198
199
200
201
202
203
204







-
+
-







 * @brief Initializes an already allocated OFDictionary with the specified key
 *	  and va_list.
 *
 * @param firstKey The first key
 * @param arguments A va_list of the other arguments
 * @return An initialized OFDictionary
 */
- (instancetype)initWithKey: (KeyType)firstKey
- (instancetype)initWithKey: (KeyType)firstKey arguments: (va_list)arguments;
		  arguments: (va_list)arguments;

/**
 * @brief Returns the object for the given key or `nil` if the key was not
 *	  found.
 *
 * @warning The returned object is *not* retained and autoreleased for
 *	    performance reasons!
230
231
232
233
234
235
236
237

238
239
240
241
242
243
244
245
227
228
229
230
231
232
233

234

235
236
237
238
239
240
241







-
+
-







 *
 * This is equivalent to OFMutableDictionary#setObject:forKey:. If the
 * dictionary is immutable, an @ref OFUndefinedKeyException is thrown.
 *
 * @param key The key to set
 * @param value The value to set the key to
 */
- (void)setValue: (nullable id)value
- (void)setValue: (nullable id)value forKey: (OFString *)key;
	  forKey: (OFString *)key;

/**
 * @brief Checks whether the dictionary contains an object equal to the
 *	  specified object.
 *
 * @param object The object which is checked for being in the dictionary
 * @return A boolean whether the dictionary contains the specified object