Converts given Scala scala.collection.Map to Java JMap.
Converts given Scala scala.collection.Map to Java JMap.
Keys and values inside map are converted using given implicit converters
,
which allow to convert nested Scala collections and primitives.
If given map is mutable, then returned Java map is mutable as well.
New type of Java map key
New type of Java map value
Implicit converter to convert from A
to C
Implicit converter to convert from B
to D
Java map wrapper around given map if given map keys and values are primitives or anything but supported Scala collections. Wrapper around new map otherwise. Example:
scala> val m = Map(3L -> Set('3')) m: scala.collection.immutable.Map[Long,scala.collection.immutable.Set[Char]] = Map(3 -> Set(3)) scala> m.deepAsJava res0: com.daodecode.scalaj.collection.package.JMap[com.daodecode.scalaj.collection.JLong,com.daodecode.scalaj.collection.JSet[com.daodecode.scalaj.collection.JChar]] = {3=[3]}