protected void printNode ( ) { System . out . println ( this . depth + ", " + this . splitAttribute + ", " + this . splitValue + ", " + this . r ) ; if ( this . internalNode ) { this . right . printNode ( ) ; this . left . printNode ( ) ; } }
Prints this node to string and if it is an internal node prints its children nodes as well . Useful for debugging the entire tree structure .