/** * Returns an iterator that interleaves elements from the decorated iterators. * * @param <E> the element type * @param iterators the array of iterators to interleave * @return an iterator, interleaving the decorated iterators * @throws NullPointerException if any iterator is null * @since 4.1 */ public static <E> ZippingIterator<E> zippingIterator(final Iterator<? extends E>... iterators) { return new ZippingIterator<>(iterators); }
/** * Returns an iterator that interleaves elements from the decorated iterators. * * @param <E> the element type * @param a the first iterator to interleave * @param b the second iterator to interleave * @return an iterator, interleaving the decorated iterators * @throws NullPointerException if any iterator is null * @since 4.1 */ public static <E> ZippingIterator<E> zippingIterator(final Iterator<? extends E> a, final Iterator<? extends E> b) { return new ZippingIterator<>(a, b); }
/** * Returns an iterator that interleaves elements from the decorated iterators. * * @param <E> the element type * @param a the first iterator to interleave * @param b the second iterator to interleave * @param c the third iterator to interleave * @return an iterator, interleaving the decorated iterators * @throws NullPointerException if any iterator is null * @since 4.1 */ public static <E> ZippingIterator<E> zippingIterator(final Iterator<? extends E> a, final Iterator<? extends E> b, final Iterator<? extends E> c) { return new ZippingIterator<>(a, b, c); }