MCPcopy Index your code
hub / github.com/processing/processing / set

Method set

core/src/processing/data/IntList.java:187–196  ·  view source on GitHub ↗

Set the entry at a particular index. If the index is past the length of the list, it'll expand the list to accommodate, and fill the intermediate entries with 0s. @webref intlist:method @brief Set the entry at a particular index

(int index, int what)

Source from the content-addressed store, hash-verified

185 * @brief Set the entry at a particular index
186 */
187 public void set(int index, int what) {
188 if (index >= count) {
189 data = PApplet.expand(data, index+1);
190 for (int i = count; i < index; i++) {
191 data[i] = 0;
192 }
193 count = index+1;
194 }
195 data[index] = what;
196 }
197
198
199 /** Just an alias for append(), but matches pop() */

Callers 1

fromRangeMethod · 0.95

Calls 1

expandMethod · 0.95

Tested by

no test coverage detected