public Iterator<Object[]> iterator() throws IllegalStateException {
if (!result.isDone()) {
throw new IllegalStateException("result not ready.");
}
try {
return new ArrayIterator(result.get(), 0, result.get().length);
} catch (InterruptedException | ExecutionException e) {
throw new IllegalStateException(e);
}
}