Check if a value is a part of the list @webref stringlist:method @webBrief Check if a value is a part of the list
(String value)
| 460 | * @webBrief Check if a value is a part of the list |
| 461 | */ |
| 462 | public boolean hasValue(String value) { |
| 463 | if (value == null) { |
| 464 | for (int i = 0; i < count; i++) { |
| 465 | if (data[i] == null) { |
| 466 | return true; |
| 467 | } |
| 468 | } |
| 469 | } else { |
| 470 | for (int i = 0; i < count; i++) { |
| 471 | if (value.equals(data[i])) { |
| 472 | return true; |
| 473 | } |
| 474 | } |
| 475 | } |
| 476 | return false; |
| 477 | } |
| 478 | |
| 479 | |
| 480 | /** |
no test coverage detected