This page is no longer maintained — Please continue to the home page at www.scala-lang.org

IntMap and LongMap

No replies
Rüdiger Klaehn
Joined: 2009-06-02,
User offline. Last seen 42 years 45 weeks ago.

Hi all,

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.

cheers,

Rüdige

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland