@@ -29,11 +29,11 @@ @protocol OFEnumerating /*! * @brief Returns an OFEnumerator to enumerate through all objects of the * collection. * - * @returns An OFEnumerator to enumerate through all objects of the collection + * @return An OFEnumerator to enumerate through all objects of the collection */ - (OFEnumerator *)objectEnumerator; @end /*! @@ -44,23 +44,21 @@ @interface OFEnumerator OF_GENERIC(ObjectType): OFObject #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) # define ObjectType id #endif /*! - * @brief Returns the next object or `nil` if there is none left. + * An array of all remaining objects in the collection. + */ +@property (readonly, nonatomic) OFArray OF_GENERIC(ObjectType) *allObjects; + +/*! + * Returns the next object or `nil` if there is none left. * * @return The next object or `nil` if there is none left */ - (nullable ObjectType)nextObject; -/*! - * @brief Returns an array of all remaining objects in the collection. - * - * @return An array of all remaining objects in the collection - */ -- (OFArray OF_GENERIC(ObjectType) *)allObjects; - /*! * @brief Resets the enumerator, so the next call to nextObject returns the * first object again. */ - (void)reset;