public static <K extends Comparable<K>, V> String toStringSorted(Map<K, V> map) {
    StringBuilder builder = new StringBuilder();
    toStringSorted(map, builder);
    return builder.toString();
  }
public static < K extends Comparable < K > , V > String toStringSorted ( Map < K , V > map ) { StringBuilder builder = new StringBuilder ( ) ; toStringSorted ( map , builder ) ; return builder . toString ( ) ; }
Stringifies a Map in a stable fashion.