2

I am using a LinkedHashMap<Double, String> in my program. But I need one with primitive data types. In trove we have map but it is not ordered? Any idea about ordered one?

Bernhard Barker
  • 54,589
  • 14
  • 104
  • 138
Osman Khalid
  • 778
  • 1
  • 7
  • 22

2 Answers2

3

There is not currently a LinkedHashMap-analogous implementation in Trove. A feature request exists here. Voting there would be useful if it's a feature you're still interested in.

Rob Eden
  • 362
  • 2
  • 7
-3

It is not a problem at all Use this:

    private TDoubleObjectMap<String> obj = new TDoubleObjectHashMap<String>();

where TDoubleObjectMap comes from gnu.trove.map and HashMap comes from gnu.trove.map.hash; P.S. It looks like there isn't linked map classes.

cdkrot
  • 279
  • 1
  • 2
  • 8