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

Method hasValue

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

@webref stringlist:method @brief Check if a value is a part of the list

(String value)

Source from the content-addressed store, hash-verified

471 * @brief Check if a value is a part of the list
472 */
473 public boolean hasValue(String value) {
474 if (value == null) {
475 for (int i = 0; i < count; i++) {
476 if (data[i] == null) {
477 return true;
478 }
479 }
480 } else {
481 for (int i = 0; i < count; i++) {
482 if (value.equals(data[i])) {
483 return true;
484 }
485 }
486 }
487 return false;
488 }
489
490
491 /**

Callers 2

appendUniqueMethod · 0.95
isCompatibleMethod · 0.95

Calls 1

equalsMethod · 0.45

Tested by

no test coverage detected