MCPcopy Create free account
hub / github.com/Var3D/var3dframe / optInt

Method optInt

core/src/core/java/var3d/net/center/json/JSONArray.java:397–399  ·  view source on GitHub ↗

Returns the value at index if it exists and is an int or can be coerced to an int. Returns 0 otherwise.

(int index)

Source from the content-addressed store, hash-verified

395 * can be coerced to an int. Returns 0 otherwise.
396 */
397 public int optInt(int index) {
398 return optInt(index, 0);
399 }
400
401 /**
402 * Returns the value at {@code index} if it exists and is an int or

Callers

nothing calls this directly

Calls 2

optMethod · 0.95
toIntegerMethod · 0.95

Tested by

no test coverage detected