@ ObjectiveCName ( "tupleWithT1:withT2:" ) public static < T1 , T2 > Promise < Tuple2 < T1 , T2 > > tuple ( Promise < T1 > t1 , Promise < T2 > t2 ) { return PromisesArray . ofPromises ( ( Promise < Object > ) t1 , ( Promise < Object > ) t2 ) . zip ( ) . map ( src -> new Tuple2 <> ( ( T1 ) src . get ( 0 ) , ( T2 ) src . get ( 1 ) ) ) ; }
Combines two promises to one with different data types