code: public static void dump(Node alt, int lv, PrintWriter out) {
          for (int i = 0; i < lv; i++)
              out.print("  ");
          out.println(alt.cs != null ? ('"'+alt.cs.toString()+'"') : "(null)");
          if (alt.branches != null) {
              for (Node br : alt.branches) {
                  dump(br, lv + 1, out);
              }
          }
      }
docs: utility function for dumping prefix tree structure. intended for debug use.
  @param alt root of prefix tree.
  @param lv indent level. 0 for root (no indent).
  @param out writer to send output to.