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