MCPcopy Create free account
hub / github.com/apache/poi / swapColors

Method swapColors

src/java/org/apache/poi/util/BinaryTree.java:1966–1973  ·  view source on GitHub ↗

exchange colors with another node @param node the node to swap with @param index _KEY or _VALUE

(Node node, int index)

Source from the content-addressed store, hash-verified

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?

Callers 1

swapPositionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected