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

Method get

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

Get the value object associated with a key. @param key A key string. @return The object associated with the key. @throws RuntimeException if the key is not found.

(String key)

Source from the content-addressed store, hash-verified

551 * @throws RuntimeException if the key is not found.
552 */
553 public Object get(String key) {
554 if (key == null) {
555 throw new RuntimeException("JSONObject.get(null) called");
556 }
557 Object object = this.opt(key);
558 if (object == null) {
559 // Adding for rev 0257 in line with other p5 api
560 return null;
561 }
562 if (object == null) {
563 throw new RuntimeException("JSONObject[" + quote(key) + "] not found");
564 }
565 return object;
566 }
567
568
569 /**

Callers 7

getStringMethod · 0.95
getIntMethod · 0.95
getLongMethod · 0.95
getDoubleMethod · 0.95
getBooleanMethod · 0.95
getJSONArrayMethod · 0.95
getJSONObjectMethod · 0.95

Calls 2

optMethod · 0.95
quoteMethod · 0.95

Tested by

no test coverage detected