0x00 Background
It is common for a list to have a specific order, assuming you have a bunch of contacts in your list, you might want to sort them in alphabet order, or if you have some kind of notes, you like to sort them in time order. These sorting requirements are common and easy, you can just use a list and a comparator, just use the compare()
method, however some are much complicated, like different kind of data, different sort rules, how to deal with the duplicated names. Also, you need to handle all the changes like insert, remove and updates. Sometimes it can be annoying, no worry, we have SortedList
.