public boolean isCompleted(){
  for (  AbortingRunnable ar : tasks) {
synchronized (ar) {
      if (!ar.done) {
        return false;
      }
    }
  }
  return true;
}

public boolean isCompleted ( ) { for ( AbortingRunnable ar : tasks ) { synchronized ( ar ) { if ( ! ar . done ) { return false ; } } } return true ; }
returns true if all tasks are done or aborted .
