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

Method get

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

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

(int i)

Source from the content-addressed store, hash-verified

98 * {@link #size()} of the array.
99 */
100 public JsonElement get(int i) {
101 return elements.get(i);
102 }
103
104 /**
105 * convenience method to get this array as a {@link Number} if it contains a single element.

Calls

no outgoing calls