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

fr.lirmm.graphik.util.stream.ArrayCloseableIterator Maven / Gradle / Ivy

There is a newer version: 1.6.1
Show newest version
package fr.lirmm.graphik.util.stream;


public class ArrayCloseableIterator extends AbstractCloseableIterator {
	
	private T[] array;
	private int indexIt = 0;
	
	public ArrayCloseableIterator(T... args) {
		array = args;
	}
	
	@Override
	public boolean hasNext() throws IteratorException {
		return indexIt < array.length;
	}

	@Override
	public T next() throws IteratorException {
		return array[indexIt++];
	}

	@Override
	public void close() {
		// do nothing
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy