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

org.rdfhdt.hdt.iterator.utils.ArrayIteratorG Maven / Gradle / Ivy

package org.rdfhdt.hdt.iterator.utils;

import java.util.Iterator;

public class ArrayIteratorG implements Iterator {

	T [] arr;
	int pos, max;
	
	public ArrayIteratorG(T [] arr) {
		this.arr = arr;
		this.pos = 0;
		this.max = arr.length;
	}
	
	public ArrayIteratorG(T [] arr, int min, int max) {
		this.arr = arr;
		this.pos = min;
		this.max = Math.min(arr.length, max);
	}
	
	@Override
	public boolean hasNext() {
		return pos




© 2015 - 2024 Weber Informatics LLC | Privacy Policy