@@ -63,10 +63,20 @@ @interface OFSet OF_GENERIC(ObjectType): OFObject #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) # define ObjectType id #endif +/*! + * An array of all objects in the set. + */ +@property (readonly, nonatomic) OFArray OF_GENERIC(ObjectType) *allObjects; + +/*! + * @return An arbitrary object in the set. + */ +@property OF_NULLABLE_PROPERTY (readonly, nonatomic) ObjectType anyObject; + /*! * @brief Creates a new set. * * @return A new, autoreleased set */ @@ -192,24 +202,10 @@ * @param set The set to create the union with */ - (OFSet OF_GENERIC(ObjectType) *)setByAddingSet: (OFSet OF_GENERIC(ObjectType) *)set; -/*! - * @brief Returns an array of all objects in the set. - * - * @return An array of all objects in the set - */ -- (OFArray OF_GENERIC(ObjectType) *)allObjects; - -/*! - * @brief Returns an arbitrary object in the set. - * - * @return An arbitrary object in the set - */ -- (nullable ObjectType)anyObject; - /*! * @brief Checks whether the set contains an object equal to the specified * object. * * @param object The object which is checked for being in the set @@ -246,17 +242,10 @@ * @param key The key of the value to set */ - (void)setValue: (id)value forKey: (OFString *)key; -/*! - * @brief Returns an OFEnumerator to enumerate through all objects of the set. - * - * @returns An OFEnumerator to enumerate through all objects of the set - */ -- (OFEnumerator OF_GENERIC(ObjectType) *)objectEnumerator; - #ifdef OF_HAVE_BLOCKS /*! * @brief Executes a block for each object in the set. * * @param block The block to execute for each object in the set