@@ -50,11 +50,11 @@ * * @note Fast enumeration on a dictionary enumerates through the keys of the * dictionary. */ #ifdef OF_HAVE_GENERICS -@interface OFDictionary : +@interface OFDictionary: #else # ifndef DOXYGEN # define KeyType id # define ObjectType id # endif @@ -74,11 +74,11 @@ * * @param dictionary An OFDictionary * @return A new autoreleased OFDictionary */ + (instancetype)dictionaryWithDictionary: - (OFDictionary OF_GENERIC(KeyType, ObjectType)*)dictionary; + (OFDictionary OF_GENERIC(KeyType, ObjectType) *)dictionary; /*! * @brief Creates a new OFDictionary with the specified key and object. * * @param key The key @@ -94,12 +94,12 @@ * @param keys An array of keys * @param objects An array of objects * @return A new autoreleased OFDictionary */ + (instancetype) - dictionaryWithObjects: (OFArray OF_GENERIC(ObjectType)*)objects - forKeys: (OFArray OF_GENERIC(KeyType)*)keys; + dictionaryWithObjects: (OFArray OF_GENERIC(ObjectType) *)objects + forKeys: (OFArray OF_GENERIC(KeyType) *)keys; /*! * @brief Creates a new OFDictionary with the specified keys and objects. * * @param keys An array of keys @@ -126,11 +126,12 @@ * OFDictionary. * * @param dictionary An OFDictionary * @return An initialized OFDictionary */ -- initWithDictionary: (OFDictionary OF_GENERIC(KeyType, ObjectType)*)dictionary; +- initWithDictionary: + (OFDictionary OF_GENERIC(KeyType, ObjectType) *)dictionary; /*! * @brief Initializes an already allocated OFDictionary with the specified key * and object. * @@ -147,12 +148,12 @@ * * @param keys An array of keys * @param objects An array of objects * @return An initialized OFDictionary */ -- initWithObjects: (OFArray OF_GENERIC(ObjectType)*)objects - forKeys: (OFArray OF_GENERIC(KeyType)*)keys; +- initWithObjects: (OFArray OF_GENERIC(ObjectType) *)objects + forKeys: (OFArray OF_GENERIC(KeyType) *)keys; /*! * @brief Initializes an already allocated OFDictionary with the specified keys * and objects. * @@ -208,11 +209,11 @@ * @ref objectForKey:. * * @param key The key whose value should be returned * @return The value for the given key or `nil` if the key was not found */ -- (nullable id)valueForKey: (OFString*)key; +- (nullable id)valueForKey: (OFString *)key; /*! * @brief Sets a value for a key. * * If the key starts with an `@`, the `@` is stripped and @@ -223,11 +224,11 @@ * * @param key The key to set * @param value The value to set the key to */ - (void)setValue: (nullable id)value - forKey: (OFString*)key; + forKey: (OFString *)key; /*! * @brief Checks whether the dictionary contains an object equal to the * specified object. * @@ -249,32 +250,32 @@ /*! * @brief Returns an array of all keys. * * @return An array of all keys */ -- (OFArray OF_GENERIC(KeyType)*)allKeys; +- (OFArray OF_GENERIC(KeyType) *)allKeys; /*! * @brief Returns an array of all objects. * * @return An array of all objects */ -- (OFArray OF_GENERIC(ObjectType)*)allObjects; +- (OFArray OF_GENERIC(ObjectType) *)allObjects; /*! * @brief Returns an OFEnumerator to enumerate through the dictionary's keys. * * @return An OFEnumerator to enumerate through the dictionary's keys */ -- (OFEnumerator OF_GENERIC(KeyType)*)keyEnumerator; +- (OFEnumerator OF_GENERIC(KeyType) *)keyEnumerator; /*! * @brief Returns an OFEnumerator to enumerate through the dictionary's objects. * * @return An OFEnumerator to enumerate through the dictionary's objects */ -- (OFEnumerator OF_GENERIC(ObjectType)*)objectEnumerator; +- (OFEnumerator OF_GENERIC(ObjectType) *)objectEnumerator; #ifdef OF_HAVE_BLOCKS /*! * @brief Executes a block for each key / object pair. * @@ -288,11 +289,11 @@ * block. * * @param block A block which maps an object for each object * @return A new autoreleased OFDictionary */ -- (OFDictionary OF_GENERIC(KeyType, id)*)mappedDictionaryUsingBlock: +- (OFDictionary OF_GENERIC(KeyType, id) *)mappedDictionaryUsingBlock: (of_dictionary_map_block_t)block; /*! * @brief Creates a new dictionary, only containing the objects for which the * block returns true. @@ -299,11 +300,11 @@ * * @param block A block which determines if the object should be in the new * dictionary * @return A new autoreleased OFDictionary */ -- (OFDictionary OF_GENERIC(KeyType, ObjectType)*)filteredDictionaryUsingBlock: +- (OFDictionary OF_GENERIC(KeyType, ObjectType) *)filteredDictionaryUsingBlock: (of_dictionary_filter_block_t)block; #endif @end #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) # undef KeyType