public static <T>Task<T> from(CompletionStage<T> stage){
  if (stage instanceof Task) {
    return (Task<T>)stage;
  }
  final Task<T> t=new Task<>();
  stage.handle(null);
  return t;
}

public static < T > Task < T > from ( CompletionStage < T > stage ) { if ( stage instanceof Task ) { return ( Task < T > ) stage ; } final Task < T > t = new Task < > ( ) ; stage . handle ( null ) ; return t ; }
wraps a completionstage as a task or just casts it if it is already a task .
