public static void composedRunnable(Collection<Runnable> runnables){
  requireNonNullElements(runnables);
  final AutoCloseable[] closables=new AutoCloseable[runnables.size()];
  int i=0;
  for (  final Runnable r : runnables) {
    closables[i++]=new CloseImpl(r);
  }
  composedClose(closables);
}

public static void composedRunnable ( Collection < Runnable > runnables ) { requireNonNullElements ( runnables ) ; final AutoCloseable [ ] closables = new AutoCloseable [ runnables . size ( ) ] ; int i = 0 ; for ( final Runnable r : runnables ) { closables [ i ++ ] = new CloseImpl ( r ) ; } composedClose ( closables ) ; }
given a number of runnables , runs the run ( ) method in sequence , even if one or several throws an exception . if several throw exceptions , the exceptions will be added to the first exception .
