MCPcopy
hub / github.com/google/gson / get

Method get

gson/src/main/java/com/google/gson/JsonArray.java:231–233  ·  view source on GitHub ↗

Returns the i-th element of the array. @param i the index of the element that is being sought. @return the element present at the i-th index. @throws IndexOutOfBoundsException if {@code i} is negative or greater than or equal to the {@link #size()} of the array.

(int i)

Source from the content-addressed store, hash-verified

229 * {@link #size()} of the array.
230 */
231 public JsonElement get(int i) {
232 return elements.get(i);
233 }
234
235 private JsonElement getAsSingleElement() {
236 int size = elements.size();

Callers 11

testSetMethod · 0.95
testViewUpdatesMethod · 0.95
testSetMethod · 0.95
testDeepCopyMethod · 0.95
testParseMixedArrayMethod · 0.95
mainMethod · 0.95

Calls 1

getMethod · 0.65

Tested by 10

testSetMethod · 0.76
testViewUpdatesMethod · 0.76
testSetMethod · 0.76
testDeepCopyMethod · 0.76
testParseMixedArrayMethod · 0.76