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

Method getString

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

Gets the String associated with a key @webref jsonobject:method @brief Gets the string value associated with a key @param key a key string @return A string which is the value. @throws RuntimeException if there is no string value for the key. @see JSONObject#getInt(String) @see JSONObject#getFloat(S

(String key)

Source from the content-addressed store, hash-verified

566 * @see JSONObject#getBoolean(String)
567 */
568 public String getString(String key) {
569 Object object = this.get(key);
570 if (object == null) {
571 // Adding for rev 0257 in line with other p5 api
572 return null;
573 }
574 if (object instanceof String) {
575 return (String)object;
576 }
577 throw new RuntimeException("JSONObject[" + quote(key) + "] is not a string");
578 }
579
580
581 /**

Callers

nothing calls this directly

Calls 5

getMethod · 0.95
quoteMethod · 0.95
optMethod · 0.95
equalsMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected