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

com.puresoltechnologies.streaming.iterators.StreamIterable Maven / Gradle / Ivy

package com.puresoltechnologies.streaming.iterators;

/**
 * This interface is used as special {@link Iterable} for
 * {@link StreamIterator}s. A special factory method helps to create the an
 * iterable out of an iterator.
 *
 * @param  is the type of elements.
 */
public interface StreamIterable extends Iterable {

	/**
	 * This method factory creates a new {@link StreamIterable} out of the provided
	 * {@link StreamIterator}.
	 *
	 * @param iterator is the iterator to use.
	 * @param       is the type of elements.
	 * @return A newly create iterable is returned.
	 */
	public static  StreamIterable of(StreamIterator iterator) {
		return () -> iterator;
	}

	@Override
	public StreamIterator iterator();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy