I need to create a immutable Scala map with java code. I have found other things on here about this but nothing that is updated to the current version.
I've tried:
public static <A, B> Map<A, B> toScalaMap(HashMap<A, B> m) {
return JavaConverters.mapAsScalaMapConverter(m).asScala().toMap(
Predef.<Tuple2<A, B>>conforms()
);
}