I have some large properties files and it was becoming a pain in the behind to read them so I was implementing my own sorting routines to try an organize things.
I ran across this (everyone probably already knows of this or other libraries but me) and it made things much simpler. Just had to add the library to a gradle project I made only for sorting properties files and was in business. Can use it directly in your projects if wish.
Can use your own Comparator also.