code: public static final Promise all(Collection<Promise> promises) {
  		if (promises == null || promises.isEmpty()) {
  			return Promise.resolve();
  		}
  		Promise[] array = new Promise[promises.size()];
  		promises.toArray(array);
  		return all(array);
  	}
docs: Returns a new Promise that is completed when all of the given Promise
  complete. If any of the given Promise complete exceptionally, then the
  returned Promise also does so, with a Promise holding this exception as
  its cause.
  
  @param promises
  array of Promises
  
  @return a new Promise that is completed when all of the given Promises
  complete