private void fixNegativeRed(Node negRed)
        {
            Node n1, n2, n3, n4, t1, t2, t3, child;
            Node parent = negRed.parent;
            if (parent.left == negRed)
            {
                n1 = negRed.left;
                n2 = negRed;
                n3 = negRed.right;
                n4 = parent;
                t1 = n3.left;
                t2 = n3.right;
                t3 = n4.right;
                n1.color = RED;
                n2.color = BLACK;
                n4.color = BLACK;
                n2.setRightChild(t1);
                Comparable temp = n4.data; n4.data = n3.data; n3.data = temp;
                n3.setLeftChild(t2);
                n3.setRightChild(t3);
                n4.setRightChild(n3);
                child = n1;
            }
            else
            {
                n4 = negRed.right;
                n3 = negRed;
                n2 = negRed.left;
                n1 = parent;
                t3 = n2.right;
                t2 = n2.left;
                t1 = n1.left;
                n4.color = RED;
                n3.color = BLACK;
                n1.color = BLACK;
                n3.setLeftChild(t3);
                Comparable temp = n1.data; n1.data = n2.data; n2.data = temp;
                n2.setRightChild(t2);
                n2.setLeftChild(t1);
                n1.setLeftChild(n2);
                child = n4;
            }

            if (child.left != null && child.left.color == RED)
            {
                fixDoubleRed(child.left);
                return;
            }
            if (child.right != null && child.right.color == RED)
            {
                fixDoubleRed(child.right);
            }
        }