Get the opposite index of the specified index @param index _KEY or _VALUE @return _VALUE (if _KEY was specified), else _KEY
(int index)
| 443 | * @return _VALUE (if _KEY was specified), else _KEY |
| 444 | */ |
| 445 | private int oppositeIndex(int index) |
| 446 | { |
| 447 | |
| 448 | // old trick ... to find the opposite of a value, m or n, |
| 449 | // subtract the value from the sum of the two possible |
| 450 | // values. (m + n) - m = n; (m + n) - n = m |
| 451 | return _INDEX_SUM - index; |
| 452 | } |
| 453 | |
| 454 | /** |
| 455 | * do the actual lookup of a piece of data |