Java tutorial
//package com.java2s; import java.util.*; import java.util.stream.Stream; public class Main { public static <T> Stream<T> parallelStream(Collection<T> collection) { return collection.parallelStream(); } public static <T> Stream<T> parallelStream(T... values) { return Stream.of(values).parallel(); } }