Changeset 23191 in osm for applications/editors/josm/plugins/livegps/src/org/json/JSONArray.java
- Timestamp:
- 2010-09-15T18:56:19+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/livegps/src/org/json/JSONArray.java
r21622 r23191 74 74 * <li>Values can be separated by <code>;</code> <small>(semicolon)</small> as 75 75 * well as by <code>,</code> <small>(comma)</small>.</li> 76 * <li>Numbers may have the 76 * <li>Numbers may have the 77 77 * <code>0x-</code> <small>(hex)</small> prefix.</li> 78 78 * </ul> … … 164 164 */ 165 165 public JSONArray(Collection collection) { 166 167 168 169 170 171 this.myArrayList.add(JSONObject.wrap(o)); 172 173 174 } 175 176 166 this.myArrayList = new ArrayList(); 167 if (collection != null) { 168 Iterator iter = collection.iterator(); 169 while (iter.hasNext()) { 170 Object o = iter.next(); 171 this.myArrayList.add(JSONObject.wrap(o)); 172 } 173 } 174 } 175 176 177 177 /** 178 178 * Construct a JSONArray from an array … … 192 192 } 193 193 194 194 195 195 /** 196 196 * Get the object value associated with an index. … … 765 765 return this; 766 766 } 767 768 767 768 769 769 /** 770 770 * Remove an index and close the hole. … … 774 774 */ 775 775 public Object remove(int index) { 776 776 Object o = opt(index); 777 777 this.myArrayList.remove(index); 778 778 return o;
Note:
See TracChangeset
for help on using the changeset viewer.