package org.autoplot.hapi; import java.util.Iterator; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; /** * Allow iteration over JSONArrays. * @author jbf */ public class JSONArrayIterator implements Iterable, Iterator { int index; JSONArray array; public JSONArrayIterator( JSONArray array ) { this.array= array; this.index= 0; } @Override public boolean hasNext() { return this.index iterator() { return this; } @Override public void remove() { // support Java 7. } }