reactor/reactor — pull request #367 by Tetradeus (2014-08-14 15:42:20+00:00)
Title: Added Promises heterogeneous when

Hi,

After playing a bit with promises, I found Promises.when very useful when playing with "homogeneous" promise (Promise of the same type and mainly of the same origin/same functional domain).

For instance, if I call x times a method returning a "Promise" with different parameters, I will join then with Promises.when to obtain a "Promise>".

But what if I would like to join "Promise" of different types and avoid to lose typed checking ?

I found the 'Tuple' version quite useful :

```java

Promise usernamePromise = username(xxx);
Promise agePromise = username(yyy);

Promise> usernameAndAgePromise = Promises.when(usernamePromise, agePromise);

```

I am not very satisfied with the implementation (because lambda are not available and because I repeat a lot of code) as well as the name of the method that cannot just be "when".

The given pull request is more to discuss about the advantage of such methods.

Waiting for your advice !