public static <T>String toString(TreeDef<T> treeDef,T root,Function<? super T,String> toString,String indent){
  StringBuilder builder=new StringBuilder();
  builder.append(toString.apply(root));
  builder.append("\n");
  toStringHelper(treeDef,root,toString,indent,builder,indent);
  return builder.toString();
}

public static < T > String toString ( TreeDef < T > treeDef , T root , Function < ? super T , String > toString , String indent ) { StringBuilder builder = new StringBuilder ( ) ; builder . append ( toString . apply ( root ) ) ; builder . append ( "\n" ) ; toStringHelper ( treeDef , root , toString , indent , builder , indent ) ; return builder . toString ( ) ; }
converts the entire tree into a string - based representation .
