public static Number sum ( int start , int endExclusive , Class type , IntProducerNumber producer ) { try { return pool . submit ( new IntOperatorTask . Sum ( start , endExclusive , type , producer ) ) . get ( ) ; } catch ( InterruptedException | ExecutionException e ) { throw new RuntimeException ( e ) ; } }
Computes sums up the results using the specified primitive type