I am trying to get a mutable.HashMap[Int, ArrayBuffer[Int]] into a immutable.HashMap[Int, Vector] for part of my class constructor. The result immutable.HashMap should be assigned to a val as well. What I am doing is reading an edgelist file into a graph format, and once that is done I want to guarentee the graph to be immutable, hence the immutable.HashMap.
The constructor should take a filename: String, read in the edgelist to some mutable form, and then at the end have a member of the class val adjList be the resulting immutable adjacency list form.
Thanks!
will do the trick (where xs is your mutable HashMap, of course).