is there any LinkedTreeMap implementation available in standard JDK or simple standalone library that support both sorting and insertion order? I found gridsim that has a LinkedTreeMap implementation. But seems it is a big library.
[UPDATE]
I want a Map which sorts elements based on keys which is Integer in my case and also gives me two kinds of Iterator based on:
- sorted keys
- insertion order
Can you see the
LinkedTreeMapof google-gson library?This preserve the insertion order.