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

Method copyColor

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

copy the color from one node to another, dealing with the fact that one or both nodes may, in fact, be null @param from the node whose color we're copying; may be null @param to the node whose color we're changing; may be null @param index _KEY or _VALUE

(Node from, Node to, int index)

Source from the content-addressed store, hash-verified

572 * @param index _KEY or _VALUE
573 */
574 private static void copyColor(Node from, Node to, int index)
575 {
576 if (to != null)
577 {
578 if (from == null)
579 {
580
581 // by default, make it black
582 to.setBlack(index);
583 }
584 else
585 {
586 to.copyColor(from, index);
587 }
588 }
589 }
590
591 /**
592 * is the specified node red? if the node does not exist, no, it's

Callers 1

doRedBlackDeleteFixupMethod · 0.95

Calls 2

setBlackMethod · 0.80
copyColorMethod · 0.45

Tested by

no test coverage detected