Class

com.daodecode.scalaj.collection.immutable

DeepJavaMapAsImmutableMap

Related Doc: package immutable

Permalink

implicit final class DeepJavaMapAsImmutableMap[A, B] extends AnyVal

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DeepJavaMapAsImmutableMap
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DeepJavaMapAsImmutableMap(javaMap: collection.JMap[A, B])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def deepAsScalaImmutable[C, D](implicit keyConverter: SConverter[A, C], valueConverter: SConverter[B, D]): Map[C, D]

    Permalink

    Converts given Java JMap to immutable Scala scala.collection.immutable.Map.

    Converts given Java JMap to immutable Scala scala.collection.immutable.Map. Keys and values inside map are converted using given implicit converters, which allow to convert nested Java collections and primitive wrappers.

    C

    New type of Scala map key

    D

    New type of Scala map value

    keyConverter

    Implicit converter to convert from A to C

    valueConverter

    Implicit converter to convert from B to D

    returns

    Scala immutable map. Example:

    scala> val jm = new java.util.HashMap[JLong, JList[JChar]]()
    jm: java.util.HashMap[com.daodecode.scalaj.collection.JLong,com.daodecode.scalaj.collection.JList[com.daodecode.scalaj.collection.JChar]] = {}
    scala> jm.put(3L, java.util.Arrays.asList('a', 'b', 'c'))
    res0: com.daodecode.scalaj.collection.JList[com.daodecode.scalaj.collection.JChar] = null
    scala> jm
    res1: java.util.HashMap[com.daodecode.scalaj.collection.JLong,com.daodecode.scalaj.collection.JList[com.daodecode.scalaj.collection.JChar]] = {3=[a, b, c]}
    scala> jm.deepAsScala
    res2: Map[Long,scala.collection.immutable.Seq[Char]] = Map(3 -> Vector(a, b, c))
  6. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  7. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  8. val javaMap: collection.JMap[A, B]

    Permalink
  9. def toString(): String

    Permalink
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped