public Task<R> firstTask(){
  if (!tasks.isEmpty()) {
    return tasks.get(0);
  }
  return null;
}

public Task < R > firstTask ( ) { if ( ! tasks . isEmpty ( ) ) { return tasks . get ( 0 ) ; } return null ; }
retrieves the first task in the list .
