code: public static <T,K,V> Collection<T> collect(Map<K, V> self, Collection<T> collector, @ClosureParams(MapEntryOrKeyValue.class) Closure<? extends T> transform) {
          for (Map.Entry<K, V> entry : self.entrySet()) {
              collector.add(callClosureForMapEntry(transform, entry));
          }
          return collector;
      }
docs: Iterates through this Map transforming each map entry into a new value using the <code>transform</code> closure
  returning the <code>collector</code> with all transformed values added to it.
  <pre class="groovyTestCase">assert [a:1, b:2].collect( [] as HashSet ) { key, value {@code ->} key*value } == ["a", "bb"] as Set
  assert [3:20, 2:30].collect( [] as HashSet ) { entry {@code ->} entry.key * entry.value } == [60] as Set</pre>
  
  @param self      a Map
  @param collector the Collection to which transformed values are added
  @param transform the transformation closure which can take one (Map.Entry) or two (key, value) parameters
  @return the collector with all transformed values added to it
  @since 1.0