@@ -18,10 +18,11 @@ #import "OFObject.h" #import "OFCollection.h" #import "OFEnumerator.h" #import "OFSerialization.h" +#import "OFJSON.h" @class OFString; #ifdef OF_HAVE_BLOCKS typedef void (^of_array_enumeration_block_t)(id object, size_t index, @@ -33,11 +34,11 @@ /** * \brief An abstract class for storing objects in an array. */ @interface OFArray: OFObject + OFSerialization, OFJSON> /** * \brief Creates a new OFArray. * * \return A new autoreleased OFArray */ @@ -230,10 +231,21 @@ * \param separator The string with which the objects should be joined * \return A string containing all objects joined by the separator */ - (OFString*)componentsJoinedByString: (OFString*)separator; +/** + * \brief Creates a string by calling the selector on all objects of the array + * and joining the strings returned by calling the selector. + * + * \param separator The string with which the objects should be joined + * \param selector The selector to perform on the objects + * \return A string containing all objects joined by the separator + */ +- (OFString*)componentsJoinedByString: (OFString*)separator + usingSelector: (SEL)selector; + /** * \brief Performs the specified selector on all objects in the array. * * \param selector The selector to perform on all objects in the array */