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

Method removeValues

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

Source from the content-addressed store, hash-verified

227
228 // Remove all instances of a particular value and return the count removed.
229 public int removeValues(String value) {
230 int ii = 0;
231 if (value == null) {
232 for (int i = 0; i < count; i++) {
233 if (data[i] != null) {
234 data[ii++] = data[i];
235 }
236 }
237 } else {
238 for (int i = 0; i < count; i++) {
239 if (!value.equals(data[i])) {
240 data[ii++] = data[i];
241 }
242 }
243 }
244 int removed = count - ii;
245 count = ii;
246 return removed;
247 }
248
249
250 // replace the first value that matches, return the index that was replaced

Callers

nothing calls this directly

Calls 1

equalsMethod · 0.45

Tested by

no test coverage detected