/* This class represents a BinaryTree node having two special fields for the red black tree algorithms, that means: depth and color. 

You may add some fields that might be helpfull
*/ 

public class RedBlackNode{
    Object element;
    RedBlackNode parent, rightChild, leftChild;
    int depth;
    String color;
    

    public RedBlackNode(Object o, RedBlackNode parent,
			RedBlackNode rightChild, RedBlackNode leftChild){
	element = o;
	this.parent = parent;
	this.rightChild = rightChild;
	this.leftChild = leftChild;
    }

    public Object getElement(){
	return element;
    }
    public void setElement(Object o){
	element = o;
    }
    public RedBlackNode getParent(){
	return parent;
    }
    public void setParent(RedBlackNode node){
	parent = node;
    }

    public RedBlackNode getRightChild(){
	return rightChild;
    }
    public void setRightChild(RedBlackNode node){
	rightChild = node;
    }

    public RedBlackNode getLeftChild(){
	return leftChild;
    }
    public void setLeftChild(RedBlackNode node){
	leftChild = node;
    }


}
