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

fr.lirmm.graphik.util.ArrayIterator Maven / Gradle / Ivy

The newest version!
package fr.lirmm.graphik.util;

import java.util.Iterator;


public class ArrayIterator implements Iterator {
	public T[] array;
	int i = 0;
	
	@SafeVarargs
	public ArrayIterator(T... array) {
		this.array = array;
	}

	@Override
	public boolean hasNext() {
		return i < array.length;
	}

	@Override
	public T next() {
		return array[i++];
	}

	@Override
	public void remove() {
		throw new UnsupportedOperationException();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy