@@ -0,0 +1,952 @@
+package me.heaton.guava.concurrency;%0A%0Aimport com.google.common.collect.ContiguousSet;%0Aimport com.google.common.collect.DiscreteDomain;%0Aimport com.google.common.collect.ImmutableList;%0Aimport com.google.common.collect.Range;%0A%0Aimport java.util.function.Consumer;%0Aimport java.util.stream.Stream;%0A%0Apublic class HelloParallelStream %7B%0A%0A  public static void main(String%5B%5D args) %7B%0A    final ContiguousSet%3CInteger%3E integers = ContiguousSet.create(Range.closed(1, 100), DiscreteDomain.integers());%0A    final ImmutableList%3CInteger%3E ints = ImmutableList.copyOf(integers);%0A    final Stream%3CInteger%3E stream = ints.parallelStream();%0A    stream.forEach(new Consumer%3CInteger%3E() %7B%0A      @Override%0A      public void accept(Integer integer) %7B%0A        System.out.println(integer + %22 thread id: %22 + Thread.currentThread().getId());%0A      %7D%0A      @Override%0A      public Consumer%3CInteger%3E andThen(Consumer%3C? super Integer%3E after) %7B%0A        return null;%0A      %7D%0A    %7D);%0A%0A  %7D%0A%0A%7D%0A

add parallel stream demo