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

Method getDouble

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

Get the double value associated with an index. @param 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

424 * be converted to a number.
425 */
426 public double getDouble(int index) {
427 Object object = this.get(index);
428 try {
429 return object instanceof Number
430 ? ((Number)object).doubleValue()
431 : Double.parseDouble((String)object);
432 } catch (Exception e) {
433 throw new RuntimeException("JSONArray[" + index + "] is not a number.");
434 }
435 }
436
437
438 /**

Callers 2

getFloatMethod · 0.95
toDoubleArrayMethod · 0.95

Calls 1

getMethod · 0.95

Tested by

no test coverage detected