public static < T > Iterator < T > iteratorOverIterators ( Iterator < ? extends T > iterator0 , Iterator < ? extends T > iterator1 ) { Objects . requireNonNull ( iterator0 , "The iterator0 is null" ) ; Objects . requireNonNull ( iterator1 , "The iterator1 is null" ) ; List < Iterator < ? extends T > > iterators = new ArrayList < Iterator < ? extends T > > ( 2 ) ; iterators . add ( iterator0 ) ; iterators . add ( iterator1 ) ; return Iterators . iteratorOverIterators ( iterators . iterator ( ) ) ; }
Returns an iterator that combines the given iterators .