MCPcopy Index your code
hub / github.com/processing/processing / getDouble

Method getDouble

core/src/processing/data/JSONArray.java:421–430  ·  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

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

Callers 2

getFloatMethod · 0.95
getDoubleArrayMethod · 0.95

Calls 1

getMethod · 0.95

Tested by

no test coverage detected