Return the first index of a particular value.
(int what)
| 380 | |
| 381 | /** Return the first index of a particular value. */ |
| 382 | public int index(int what) { |
| 383 | for (int i = 0; i < count; i++) { |
| 384 | if (data[i] == what) { |
| 385 | return i; |
| 386 | } |
| 387 | } |
| 388 | return -1; |
| 389 | } |
| 390 | |
| 391 | |
| 392 | /** |