I have a
Map<Float, MyObject>
What is the best way to keep the map sorted according to the float?
Is SortedMap
the best answer? TreeMap
? How do I use it?
I only create the map once and replace the MyObject
frequently using myMap.put()
and myMap.get()
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…