Class JavaScala
- java.lang.Object
-
- com.mongodb.spark.sql.connector.interop.JavaScala
-
public final class JavaScala extends java.lang.Object
Utils object to convert Java To Scala to enable cross build
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <K,V>
java.util.Map<K,V>asJava(scala.collection.Map<K,V> data)
Wrapper to convert a scala map to a java mapstatic <A> java.util.List<A>
asJava(scala.collection.Seq<A> data)
Wrapper to convert a scala seq to a java liststatic <A> scala.collection.Seq<A>
asScala(java.util.List<A> data)
Wrapper to convert a java list to a scala seqstatic <K,V>
scala.collection.Map<K,V>asScala(java.util.Map<K,V> data)
Wrapper to convert a java map to a scala map
-
-
-
Method Detail
-
asScala
public static <K,V> scala.collection.Map<K,V> asScala(java.util.Map<K,V> data)
Wrapper to convert a java map to a scala map- Type Parameters:
K
- keyV
- value- Parameters:
data
- java collection- Returns:
- scala collection
-
asScala
public static <A> scala.collection.Seq<A> asScala(java.util.List<A> data)
Wrapper to convert a java list to a scala seq- Type Parameters:
A
- value- Parameters:
data
- java collection- Returns:
- scala collection
-
asJava
public static <K,V> java.util.Map<K,V> asJava(scala.collection.Map<K,V> data)
Wrapper to convert a scala map to a java map- Type Parameters:
K
- keyV
- value- Parameters:
data
- java collection- Returns:
- scala collection
-
asJava
public static <A> java.util.List<A> asJava(scala.collection.Seq<A> data)
Wrapper to convert a scala seq to a java list- Type Parameters:
A
- value- Parameters:
data
- java collection- Returns:
- scala collection
-
-