public static < S extends Iterable < ? extends T > , T > Iterator < T > iteratorOverIterables ( Iterator < S > iterablesIterator ) { Objects . requireNonNull ( iterablesIterator , "The iterablesIterator is null" ) ; TransformingIterator < S , Iterator < ? extends T > > iteratorIterator = new TransformingIterator < S , Iterator < ? extends T > > ( iterablesIterator , iterable -> iterable . iterator ( ) ) ; return new CombiningIterator < T > ( iteratorIterator ) ; }
Returns an iterator that combines the iterators that are returned by the iterables that are provided by the given iterator