Here you can find the source of powerTo(final double base, final double[] exponents)
public static Callable powerTo(final double base, final double[] exponents) throws Exception
//package com.java2s; import java.util.concurrent.*; public class Main { public static Callable powerTo(final double base, final double[] exponents) throws Exception { Callable c = new Callable() { public Object call() throws Exception { double[] result = new double[exponents.length]; for (int i = 0; i < exponents.length; i++) { result[i] = Math.pow(base, exponents[i]); }/* w ww. j a va2 s.co m*/ return result; } }; return c; } }