MCPcopy Index your code
hub / github.com/benfry/processing4 / removeValue

Method removeValue

core/src/processing/data/StringList.java:201–218  ·  view source on GitHub ↗
(String value)

Source from the content-addressed store, hash-verified

199
200 // Remove the first instance of a particular value and return its index.
201 @SuppressWarnings("unused")
202 public int removeValue(String value) {
203 if (value == null) {
204 for (int i = 0; i < count; i++) {
205 if (data[i] == null) {
206 remove(i);
207 return i;
208 }
209 }
210 } else {
211 int index = index(value);
212 if (index != -1) {
213 remove(index);
214 return index;
215 }
216 }
217 return -1;
218 }
219
220
221 // Remove all instances of a particular value and return the count removed.

Callers 1

PreferencesFrameMethod · 0.95

Calls 2

removeMethod · 0.95
indexMethod · 0.95

Tested by

no test coverage detected