- About Scala
- In the Enterprise
- Scala Community
- Language Research
- In the Press
- The Scala Team
- Scala's Prehistory
- Contact Us
- Learning Scala
- Tour of Scala
- Scala API
- Setup & Getting Started
- Programming Guides
- Other Guides
- Code Examples
- Scala Developers
IntMap and LongMap
Thu, 2011-10-27, 19:53
I just found IntMap and LongMap http://www.scala-lang.org/api/current/scala/collection/immutable/IntMap.....
I would like to use them for a situation where I need a fast _sorted_
map with Int or Long keys.
But it does not say in the documentation whether it is in fact sorted
by keys. Since it is a trie this should be the case. It seems that it
sorts as an unsigned int, but that is OK for me since the keys I want
to store (some kind of unique IDs) are all positive.
The documentation mentions that "This class is as of 2.8 largely
superseded by HashMap.". So will this class be deprecated at some
point, or will it remain for the forseeable future? A normal HashMap
is useless for me since it is not sorted by keys.