MCPcopy Create free account
hub / github.com/MCBans/MCBans / getInt

Method getInt

src/main/java/com/mcbans/plugin/org/json/JSONArray.java:254–264  ·  view source on GitHub ↗

Get the int value associated with an index. @param index The index must be between 0 and length() - 1. @return The value. @throws JSONException If the key is not found or if the value is not a number.

(int index)

Source from the content-addressed store, hash-verified

252 * @throws JSONException If the key is not found or if the value is not a number.
253 */
254 public int getInt(int index) throws JSONException {
255 Object object = get(index);
256 try {
257 return object instanceof Number ?
258 ((Number)object).intValue() :
259 Integer.parseInt((String)object);
260 } catch (Exception e) {
261 throw new JSONException("JSONArray[" + index +
262 "] is not a number.");
263 }
264 }
265
266
267 /**

Callers 9

optIntMethod · 0.95
loadConfigMethod · 0.45
getMaxAltsMethod · 0.45
getBackDaysAgoMethod · 0.45
getSyncIntervalMethod · 0.45
getCallBackIntervalMethod · 0.45
getTimeoutInSecMethod · 0.45
readStringMethod · 0.45
readIntMethod · 0.45

Calls 1

getMethod · 0.95

Tested by

no test coverage detected