public static <T> Collection<T> collect(Object self, Collection<T> collector, Closure<? extends T> transform) {
        return collect(InvokerHelper.asIterator(self), collector, transform);
    }
public static < T > Collection < T > collect ( Object self , Collection < T > collector , Closure < ? extends T > transform ) { return collect ( InvokerHelper . asIterator ( self ) , collector , transform ) ; }
Iterates through this aggregate Object transforming each item into a new value using the <code>transform</code> closure
and adding it to the supplied <code>collector</code>.

@param self      an aggregate Object with an Iterator returning its items
@param collector the Collection to which the transformed values are added
@param transform the closure used to transform each item of the aggregate object
@return the collector with all transformed values added to it
@since 1.0