private void buildString(StringBuilder sb,TwoDNode node){
  if (node == null) {
    return;
  }
  TwoDNode left=node.getBelow();
  TwoDNode right=node.getAbove();
  if (left != null) {
    buildString(sb,left);
  }
  sb.append(node.toString());
  if (right != null) {
    buildString(sb,right);
  }
}

private void buildString ( StringBuilder sb , TwoDNode node ) { if ( node == null ) { return ; } TwoDNode left = node . getBelow ( ) ; TwoDNode right = node . getAbove ( ) ; if ( left != null ) { buildString ( sb , left ) ; } sb . append ( node . toString ( ) ) ; if ( right != null ) { buildString ( sb , right ) ; } }
helper method for tostring ( ) .
