static BatchExecutor of(final Executor executor) {
		requireNonNull(executor);

		if (executor instanceof ForkJoinPool pool) {
			return new BatchForkJoinPool(pool);
		} else {
			return new PartitionBatchExecutor(executor);
		}
	}
Create a batch executor, where the execution is forwarded to the given
{@code executor}.

@param executor the executor, which is actually executing the tasks
@return a new batch executor
@throws NullPointerException if the given {@code executor} is {@code null}
jenetics/src/main/java/io/jenetics/util/BatchExecutor.java