private void formatNodeTo(Formatter f,int level,RadixTreeNode<T> node){
  for (int i=0; i < level; i++) {
    f.format(" ");
  }
  f.format("|");
  for (int i=0; i < level; i++) {
    f.format("-");
  }
  if (node.isReal() == true)   f.format("%s[%s]*%n",node.getKey(),node.getValue());
 else   f.format("%s%n",node.getKey());
  for (  RadixTreeNode<T> child : node.getChildern()) {
    formatNodeTo(f,level + 1,child);
  }
}

private void formatNodeTo ( Formatter f , int level , RadixTreeNode < T > node ) { for ( int i = 0 ; i < level ; i ++ ) { f . format ( " " ) ; } f . format ( "|" ) ; for ( int i = 0 ; i < level ; i ++ ) { f . format ( "-" ) ; } if ( node . isReal ( ) == true ) f . format ( "%s[%s]*%n" , node . getKey ( ) , node . getValue ( ) ) ; else f . format ( "%s%n" , node . getKey ( ) ) ; for ( RadixTreeNode < T > child : node . getChildern ( ) ) { formatNodeTo ( f , level + 1 , child ) ; } }
warning ! do not use this for a large trie , it ' s for testing purpose only .
