Set the red bit true or false.
(int position, boolean isRed)
| 77 | * Set the red bit true or false. |
| 78 | */ |
| 79 | private void setRed(int position, boolean isRed) { |
| 80 | int offset = position * ELEMENT_SIZE + LEFT_OFFSET; |
| 81 | if (isRed) { |
| 82 | data.set(offset, data.get(offset) | 1); |
| 83 | } else { |
| 84 | data.set(offset, data.get(offset) & ~1); |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | /** |
| 89 | * Get the left field of the given position. |