Here you can find the source of streamof(Iterable
public static <T> Stream<T> streamof(Iterable<T> vals)
//package com.java2s; //License from project: Open Source License import static java.util.stream.StreamSupport.*; import java.util.stream.Stream; public class Main { public static <T> Stream<T> streamof(Iterable<T> vals) { return streamof(vals, false); }/* ww w . jav a 2s .c o m*/ public static <T> Stream<T> streamof(Iterable<T> vals, boolean parallel) { return stream(vals.spliterator(), parallel); } }