MCPcopy Create free account
hub / github.com/Var3D/var3dframe / get

Method get

core/src/core/java/var3d/net/center/json/JSONArray.java:275–285  ·  view source on GitHub ↗

Returns the value at index. @throws JSONException if this array has no value at index, or if that value is the null reference. This method returns normally if the value is JSONObject#NULL.

(int index)

Source from the content-addressed store, hash-verified

273 * normally if the value is {@code JSONObject#NULL}.
274 */
275 public Object get(int index) throws JSONException {
276 try {
277 Object value = values.get(index);
278 if (value == null) {
279 throw new JSONException("Value at " + index + " is null.");
280 }
281 return value;
282 } catch (IndexOutOfBoundsException e) {
283 throw new JSONException("Index " + index + " out of range [0.." + values.size() + ")");
284 }
285 }
286
287 /**
288 * Returns the value at {@code index}, or null if the array has no value

Callers 10

getBooleanMethod · 0.95
getDoubleMethod · 0.95
getIntMethod · 0.95
getLongMethod · 0.95
getStringMethod · 0.95
getJSONArrayMethod · 0.95
getJSONObjectMethod · 0.95
JSONArrayMethod · 0.45
optMethod · 0.45
joinMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected