exchange colors with another node @param node the node to swap with @param index _KEY or _VALUE
(Node node, int index)
| 1964 | * @param index _KEY or _VALUE |
| 1965 | */ |
| 1966 | public void swapColors(Node node, int index) |
| 1967 | { |
| 1968 | |
| 1969 | // Swap colors -- old hacker's trick |
| 1970 | _black[ index ] ^= node._black[ index ]; |
| 1971 | node._black[ index ] ^= _black[ index ]; |
| 1972 | _black[ index ] ^= node._black[ index ]; |
| 1973 | } |
| 1974 | |
| 1975 | /** |
| 1976 | * is this node black? |