[Solved] Sorting TreeMap alphabetically
Eric Berry wrote a handy class that compares Strings by human values instead of traditional machine values. Below is a modified version of it along with Object comparator (what I think you are looking for) and its testing class. An example on how to use the string comparator: Map<String,String> humanSortedMap = new TreeMap<>(new AlphaNumericStringComparator()); An … Read more