MCPcopy Create free account
hub / github.com/benfry/processing4 / remove

Method remove

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

Remove an element from the specified index. @webref stringlist:method @webBrief Remove an element from the specified index

(int index)

Source from the content-addressed store, hash-verified

185 * @webBrief Remove an element from the specified index
186 */
187 public String remove(int index) {
188 if (index < 0 || index >= count) {
189 throw new ArrayIndexOutOfBoundsException(index);
190 }
191 String entry = data[index];
192 for (int i = index; i < count-1; i++) {
193 data[i] = data[i+1];
194 }
195 count--;
196 return entry;
197 }
198
199
200 // Remove the first instance of a particular value and return its index.

Callers 2

removeValueMethod · 0.95
removeChoiceMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected