Jeriho
Jeriho

Reputation: 7309

How to create sorted map in scala?

How to create sorted map in scala (mutable/immutable)?

Upvotes: 5

Views: 3520

Answers (2)

F. P. Freely
F. P. Freely

Reputation: 1154

There's always java.util.TreeMap which, although not as nice as Scala's maps, is probably exactly the behavior for which you're looking.

Upvotes: 0

Aaron Digulla
Aaron Digulla

Reputation: 328850

Use a TreeMap.

Upvotes: 9

Related Questions