public static StringBuilder appendMap(StringBuilder buff,HashMap<String,?> map){
  ArrayList<String> list=New.arrayList(map.keySet());
  Collections.sort(list);
  for (  String k : list) {
    appendMap(buff,k,map.get(k));
  }
  return buff;
}

public static StringBuilder appendMap ( StringBuilder buff , HashMap < String , ? > map ) { ArrayList < String > list = New . arrayList ( map . keySet ( ) ) ; Collections . sort ( list ) ; for ( String k : list ) { appendMap ( buff , k , map . get ( k ) ) ; } return buff ; }
append a map to the string builder , sorted by key .
