Medusa\Tree\PersistentRedBlackTree::flipColors PHP Method

flipColors() private method

private flipColors ( Medusa\Tree\RedBlackTree $t )
$t Medusa\Tree\RedBlackTree
    private function flipColors(RedBlackTree $t)
    {
        $color = $t->isRoot() ? RedBlackTree::BLACK : !$t->color();
        return new self($t->key(), $t->value(), $this->flipColor($t->left()), $this->flipColor($t->right()), $color, $t->isRoot());
    }