public class JSONArray extends Object
| 构造器和说明 |
|---|
JSONArray() |
JSONArray(Collection<Object> collection) |
JSONArray(JSONTokener x) |
JSONArray(Object array) |
JSONArray(String source) |
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
get(int index) |
boolean |
getBoolean(int index) |
double |
getDouble(int index) |
int |
getInt(int index) |
JSONArray |
getJSONArray(int index) |
JSONObject |
getJSONObject(int index) |
long |
getLong(int index) |
String |
getString(int index) |
boolean |
isNull(int index) |
String |
join(String separator) |
int |
length() |
Object |
opt(int index) |
boolean |
optBoolean(int index) |
boolean |
optBoolean(int index,
boolean defaultValue) |
double |
optDouble(int index) |
double |
optDouble(int index,
double defaultValue) |
int |
optInt(int index) |
int |
optInt(int index,
int defaultValue) |
JSONArray |
optJSONArray(int index) |
JSONObject |
optJSONObject(int index) |
long |
optLong(int index) |
long |
optLong(int index,
long defaultValue) |
String |
optString(int index) |
String |
optString(int index,
String defaultValue) |
JSONArray |
put(boolean value) |
JSONArray |
put(Collection<Object> value) |
JSONArray |
put(double value) |
JSONArray |
put(int value) |
JSONArray |
put(int index,
boolean value) |
JSONArray |
put(int index,
Collection<Object> value) |
JSONArray |
put(int index,
double value) |
JSONArray |
put(int index,
int value) |
JSONArray |
put(int index,
long value) |
JSONArray |
put(int index,
Map<String,Object> value) |
JSONArray |
put(int index,
Object value) |
JSONArray |
put(long value) |
JSONArray |
put(Map<String,Object> value) |
JSONArray |
put(Object value) |
Object |
remove(int index) |
boolean |
similar(Object other) |
JSONObject |
toJSONObject(JSONArray names) |
String |
toString() |
String |
toString(int indentFactor) |
Writer |
write(Writer writer) |
public JSONArray()
public JSONArray(JSONTokener x) throws JSONException
public JSONArray(String source) throws JSONException
public JSONArray(Collection<Object> collection)
public JSONArray(Object array) throws JSONException
public Object get(int index) throws JSONException
public boolean getBoolean(int index)
throws JSONException
public double getDouble(int index)
throws JSONException
public int getInt(int index)
throws JSONException
public JSONArray getJSONArray(int index) throws JSONException
public JSONObject getJSONObject(int index) throws JSONException
public long getLong(int index)
throws JSONException
public String getString(int index) throws JSONException
public boolean isNull(int index)
public String join(String separator) throws JSONException
public int length()
public Object opt(int index)
public boolean optBoolean(int index)
public boolean optBoolean(int index,
boolean defaultValue)
public double optDouble(int index)
public double optDouble(int index,
double defaultValue)
public int optInt(int index)
public int optInt(int index,
int defaultValue)
public JSONArray optJSONArray(int index)
public JSONObject optJSONObject(int index)
public long optLong(int index)
public long optLong(int index,
long defaultValue)
public String optString(int index)
public JSONArray put(boolean value)
public JSONArray put(Collection<Object> value)
public JSONArray put(double value) throws JSONException
public JSONArray put(int value)
public JSONArray put(long value)
public JSONArray put(int index, boolean value) throws JSONException
public JSONArray put(int index, Collection<Object> value) throws JSONException
public JSONArray put(int index, double value) throws JSONException
public JSONArray put(int index, int value) throws JSONException
public JSONArray put(int index, long value) throws JSONException
public JSONArray put(int index, Map<String,Object> value) throws JSONException
public JSONArray put(int index, Object value) throws JSONException
public Object remove(int index)
public boolean similar(Object other)
public JSONObject toJSONObject(JSONArray names) throws JSONException
public String toString()
public String toString(int indentFactor) throws JSONException
public Writer write(Writer writer) throws JSONException
Copyright © 2015. All rights reserved.