Пример #1
0
 /**
  * Zips the values of this promise with <code>another</code>, and creates a new promise holding
  * the tuple of their results
  *
  * @param another
  */
 public <B> Promise<Tuple<A, B>> zip(Promise<B> another) {
   return wrap(wrapped().zip(another.wrapped()))
       .map(
           new Function<scala.Tuple2<A, B>, Tuple<A, B>>() {
             public Tuple<A, B> apply(scala.Tuple2<A, B> scalaTuple) {
               return new Tuple(scalaTuple._1, scalaTuple._2);
             }
           });
 }