code: public static <S,T> Future<T> collect(Future<S> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure<T> transform) {
          Objects.requireNonNull(self);
          Objects.requireNonNull(transform);
          return new TransformedFuture<T>(self, transform);
      }
docs: Returns a Future asynchronously returning a transformed result.
  <pre class="_temp_disabled_groovyTestCase">
  import java.util.concurrent.*
  def executor = Executors.newSingleThreadExecutor()
  Future<String> foobar = executor.submit{ "foobar" }
  Future<Integer> foobarSize = foobar.collect{ it.size() }
  assert foobarSize.get() == 6
  executor.shutdown()
  </pre>
  
  @param self      a Future
  @param transform the closure used to transform the Future value
  @return a Future allowing the transformed value to be obtained asynchronously