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

Method getLong

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

Returns the value at index if it exists and is a long or can be coerced to a long. @throws JSONException if the value at index doesn't exist or cannot be coerced to a long.

(int index)

Source from the content-addressed store, hash-verified

416 * cannot be coerced to a long.
417 */
418 public long getLong(int index) throws JSONException {
419 Object object = get(index);
420 Long result = JSON.toLong(object);
421 if (result == null) {
422 throw JSON.typeMismatch(index, object, "long");
423 }
424 return result;
425 }
426
427 /**
428 * Returns the value at {@code index} if it exists and is a long or

Callers

nothing calls this directly

Calls 3

getMethod · 0.95
toLongMethod · 0.95
typeMismatchMethod · 0.95

Tested by

no test coverage detected