MCPcopy Index your code
hub / github.com/benfry/processing4 / getLong

Method getLong

core/src/processing/data/JSONArray.java:365–374  ·  view source on GitHub ↗

Get the long value associated with an index. @param index The index must be between 0 and length() - 1 @return The value. @throws RuntimeException If the key is not found or if the value cannot be converted to a number.

(int index)

Source from the content-addressed store, hash-verified

363 * be converted to a number.
364 */
365 public long getLong(int index) {
366 Object object = this.get(index);
367 try {
368 return object instanceof Number
369 ? ((Number)object).longValue()
370 : Long.parseLong((String)object);
371 } catch (Exception e) {
372 throw new RuntimeException("JSONArray[" + index + "] is not a number.");
373 }
374 }
375
376
377 /**

Callers 1

toLongArrayMethod · 0.95

Calls 1

getMethod · 0.95

Tested by

no test coverage detected