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

Method set

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

Replaces the element at the specified position in this array with the specified element. @param index index of the element to replace @param element element to be stored at the specified position @return the element previously at the specified position @throws IndexOutOfBoundsException if the speci

(int index, JsonElement element)

Source from the content-addressed store, hash-verified

147 * @throws IndexOutOfBoundsException if the specified index is outside the array bounds
148 */
149 @CanIgnoreReturnValue
150 public JsonElement set(int index, JsonElement element) {
151 return elements.set(index, element == null ? JsonNull.INSTANCE : element);
152 }
153
154 /**
155 * Removes the first occurrence of the specified element from this array, if it is present. If the

Callers 15

testSetMethod · 0.95
testSetMethod · 0.45
testAddMethod · 0.45
runMethod · 0.45
increaseVersionNumberMethod · 0.45
testDateFormatStringMethod · 0.45
readMethod · 0.45
runMethod · 0.45

Calls

no outgoing calls

Tested by 14

testSetMethod · 0.76
testSetMethod · 0.36
testAddMethod · 0.36
runMethod · 0.36
increaseVersionNumberMethod · 0.36
testDateFormatStringMethod · 0.36
readMethod · 0.36
runMethod · 0.36