Create a SortedMap in Java with a custom Comparator

Posted by kunjaan on Stack Overflow See other posts from Stack Overflow or by kunjaan
Published on 2010-05-01T03:56:52Z Indexed on 2010/05/10 7:54 UTC
Read the original article Hit count: 251

Filed under:
|
|
|
|

I want to create a TreeMap in Java with a custom sort order. The sorted keys which are string need to be sorted according to the second character. The values are also string.

Sample map:

Za,FOO
Ab,Bar

© Stack Overflow or respective owner

Related posts about treemap

Related posts about java