mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-03 11:25:30 -04:00
JSONArray.remove
This commit is contained in:
parent
4d86b05d3c
commit
cdaaf12557
@ -75,7 +75,7 @@ import java.util.Map;
|
|||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* @author JSON.org
|
* @author JSON.org
|
||||||
* @version 2013-04-18
|
* @version 2014-04-18
|
||||||
*/
|
*/
|
||||||
public class JSONArray {
|
public class JSONArray {
|
||||||
|
|
||||||
@ -814,7 +814,9 @@ public class JSONArray {
|
|||||||
*/
|
*/
|
||||||
public Object remove(int index) {
|
public Object remove(int index) {
|
||||||
Object o = this.opt(index);
|
Object o = this.opt(index);
|
||||||
|
if (index >= 0 && index < this.length()) {
|
||||||
this.myArrayList.remove(index);
|
this.myArrayList.remove(index);
|
||||||
|
}
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user