MCPcopy Create free account
hub / github.com/apache/orc / isRed

Method isRed

java/core/src/java/org/apache/orc/impl/RedBlackTree.java:71–74  ·  view source on GitHub ↗

Is the given node red as opposed to black? To prevent having an extra word in the data array, we just the low bit on the left child index.

(int position)

Source from the content-addressed store, hash-verified

69 * in the data array, we just the low bit on the left child index.
70 */
71 protected boolean isRed(int position) {
72 return position != NULL &&
73 (data.get(position * ELEMENT_SIZE + LEFT_OFFSET) & 1) == 1;
74 }
75
76 /**
77 * Set the red bit true or false.

Callers 4

addMethod · 0.95
checkSubtreeMethod · 0.80
checkTreeMethod · 0.80
printTreeMethod · 0.80

Calls 1

getMethod · 0.45

Tested by 3

checkSubtreeMethod · 0.64
checkTreeMethod · 0.64
printTreeMethod · 0.64