fr.lirmm.graphik.util.stream.ArrayCloseableIterator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of integraal-graal-ruleset-analysis Show documentation
Show all versions of integraal-graal-ruleset-analysis Show documentation
Rule base analysis for InteGraal. This is imported from Graal
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
}
}