All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.daisy.dotify.common.collection.CompoundIterable Maven / Gradle / Ivy

The newest version!
package org.daisy.dotify.common.collection;

import java.util.Iterator;

/**
 * Provides a method to iterate over several iterables of the same type
 * as if the items were part of the same iterable.
 * @author Joel Håkansson
 *
 * @param  the type of iterable
 */
public class CompoundIterable implements Iterable {
	private final Iterable> iterables;
	
	/**
	 * Creates a new compound iterable
	 * @param iterables the iterables to use
	 */
	public CompoundIterable(Iterable> iterables) {
		this.iterables = iterables;
	}

	@Override
	public Iterator iterator() {
		return new CompoundIterator<>(iterables);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy