1
0
Fork 0
mirror of https://github.com/ethauvin/JSON-java.git synced 2025-06-17 07:50:52 -07:00

Merge pull request #132 from douglascrockford/iterable-JSONArray

made JSONArray iterable.
This commit is contained in:
Sean Leary 2015-06-07 10:50:27 -05:00
commit 04eab1662c

View file

@ -75,9 +75,9 @@ import java.util.Map;
* </ul>
*
* @author JSON.org
* @version 2014-05-03
* @version 2015-06-04
*/
public class JSONArray {
public class JSONArray implements Iterable<Object> {
/**
* The arrayList where the JSONArray's properties are kept.
@ -179,6 +179,11 @@ public class JSONArray {
}
}
@Override
public Iterator<Object> iterator() {
return myArrayList.iterator();
}
/**
* Get the object value associated with an index.
*