package com.github.visitorj.util;

import java.util.Iterator;

/**
 * Merge a sequence of {@link Iterable} objects in a single {@link Iterable}.
 */
public class CompositeIterable<T> implements Iterable<T> {

	private final Iterable<? extends Iterable<? extends T>> iterables;

	public CompositeIterable(Iterable<? extends Iterable<? extends T>> iterables) {
		this.iterables = iterables;
	}

	@Override
	public Iterator<T> iterator() {
		return CompositeIterator.fromIterableOfIterables(iterables);
	}

}

@@ -30,16 +30,42 @@
 til;%0D%0A%0D%0A
+import java.util.Arrays;%0D%0A
 import j
@@ -308,16 +308,137 @@
 les;%0D%0A%0D%0A
+%09@SafeVarargs%0D%0A%09public CompositeIterable(Iterable%3C? extends T%3E... iterables) %7B%0D%0A%09%09this(Arrays.asList(iterables));%0D%0A%09%7D%0D%0A%0D%0A
 %09public 

add convenience method