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

Method replaceValues

core/src/processing/data/StringList.java:272–290  ·  view source on GitHub ↗
(String value, String newValue)

Source from the content-addressed store, hash-verified

270
271 // replace all values that match, return the count of those replaced
272 public int replaceValues(String value, String newValue) {
273 int changed = 0;
274 if (value == null) {
275 for (int i = 0; i < count; i++) {
276 if (data[i] == null) {
277 data[i] = newValue;
278 changed++;
279 }
280 }
281 } else {
282 for (int i = 0; i < count; i++) {
283 if (value.equals(data[i])) {
284 data[i] = newValue;
285 changed++;
286 }
287 }
288 }
289 return changed;
290 }
291
292
293 /**

Callers

nothing calls this directly

Calls 1

equalsMethod · 0.45

Tested by

no test coverage detected