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

scouter.util.NodeEnumer Maven / Gradle / Ivy

package scouter.util;

import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

public class NodeEnumer {
	final int max;
	int current;
	private NodeList nodeList;

	public NodeEnumer(NodeList nodeList) {
		this.max = nodeList == null ? 0 : nodeList.getLength();
		this.current = 0;
		this.nodeList = nodeList;
	}

	public boolean hasNext() {
		return current < max;
	}

	public Node next() {
		return nodeList.item(current++);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy