void printDotNodesAtLevel ( PrintStream os , int levelToPrint , boolean detail , PrintMojo . PrintTreeOptions treeOptions ) { if ( getDepth ( ) == levelToPrint ) { printDotNode ( os , detail , treeOptions ) ; return ; } assert ( getDepth ( ) < levelToPrint ) ; if ( leftChild != null ) { leftChild . printDotNodesAtLevel ( os , levelToPrint , detail , treeOptions ) ; } if ( rightChild != null ) { rightChild . printDotNodesAtLevel ( os , levelToPrint , detail , treeOptions ) ; } }
Recursively print nodes at a particular depth level in the tree . Useful to group them so they render properly .