Code example for ListenableFuture

Methods: get

0
   private static <T> Iterable<T> unwrap(Iterable<ListenableFuture<? extends T>> values) { 
      return transform(values, new Function<ListenableFuture<? extends T>, T>() { 
         @Override 
         public T apply(ListenableFuture<? extends T> from) { 
            try { 
               return from.get(); 
            } catch (InterruptedException e) { 
               propagate(e); 
            } catch (ExecutionException e) { 
               propagate(e); 
            } 
            return null; 
         } 
          
         @Override 
         public String toString() { 
            return "callGetOnFuture()"; 
         } 
      }); 
   } 
Experience pair programming with AI  Get Codota for Java