Package: java.util.concurrent

## [Java] Interface Future

-     public interface Future

  GDK enhancements for Future.

  displayName:
    Future
  receiverFqcn:
    java.util.concurrent.Future

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `<S, T>` | `public Future<T>` | `collect(Closure<T> transform)` Returns a `Future` asynchronously returning a transformed result.

- - ### Method Detail

    - #### <S, T> public Future<T> collect(Closure<T> transform)

      Returns a `Future` asynchronously returning a transformed result.

           import java.util.concurrent.*
           def executor = Executors.newSingleThreadExecutor()
           Future foobar = executor.submit{ "foobar" }
           Future foobarSize = foobar.collect{ it.size() }
           assert foobarSize.get() == 6
           executor.shutdown()

      Parameters:
        `transform` - the closure used to transform the Future value
      Returns:
        a Future allowing the transformed value to be obtained asynchronously
      Since:
        3.0.0