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

Method getDouble

core/src/processing/data/JSONObject.java:709–718  ·  view source on GitHub ↗

Get the double value associated with a key. @param key A key string. @return The numeric value. @throws RuntimeException if the key is not found or if the value is not a Number object and cannot be converted to a number.

(String key)

Source from the content-addressed store, hash-verified

707 * if the value is not a Number object and cannot be converted to a number.
708 */
709 public double getDouble(String key) {
710 Object object = this.get(key);
711 try {
712 return object instanceof Number
713 ? ((Number)object).doubleValue()
714 : Double.parseDouble((String)object);
715 } catch (Exception e) {
716 throw new RuntimeException("JSONObject[" + quote(key) + "] is not a number.");
717 }
718 }
719
720
721 /**

Callers 1

getFloatMethod · 0.95

Calls 2

getMethod · 0.95
quoteMethod · 0.95

Tested by

no test coverage detected