Created
October 28, 2015 01:31
-
-
Save sou-hi/52ab2b7bbbc92167cee5 to your computer and use it in GitHub Desktop.
convert java.util.Map[String, Object] to scala.collection.immutable.Map[String, Any] ref: http://qiita.com/sou-hi/items/b7fd7150ab915a03d491
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import scala.collection.JavaConversions._ | |
| val m = new java.util.HashMap[String, Object]() | |
| m.put("Foo", java.lang.Boolean.TRUE) | |
| m.put("Bar", java.lang.Integer.valueOf(1)) | |
| val m2: Map[String, Any] = m.toMap | |
| println(m2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment