Class 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 map
      static <A> java.util.List<A> asJava​(scala.collection.Seq<A> data)
      Wrapper to convert a scala seq to a java list
      static <A> scala.collection.Seq<A> asScala​(java.util.List<A> data)
      Wrapper to convert a java list to a scala seq
      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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 - key
        V - 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 - key
        V - 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