DeepJavaListAsImmutableSeq

com.daodecode.scalaj.collection.immutable.package$.DeepJavaListAsImmutableSeq
final implicit class DeepJavaListAsImmutableSeq[A](val javaList: List[A]) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

def deepAsScalaImmutable[B](implicit converter: SConverter[A, B]): Seq[B]

Converts given Java JList to immutable Scala scala.collection.immutable.Seq Elements inside list are converted using given implicit converter, which allows to convert nested Java collections and primitive wrappers.

Converts given Java JList to immutable Scala scala.collection.immutable.Seq Elements inside list are converted using given implicit converter, which allows to convert nested Java collections and primitive wrappers.

Type parameters

B

New type of resulting Buffer elements

Value parameters

converter

Implicit converter to convert from A to B.

Attributes

Returns

Scala immutable seq. Example:

          scala> val jl = new java.util.ArrayList[java.util.Set[JInt]]()
          jl: java.util.ArrayList[java.util.Set[com.daodecode.scalaj.collection.JInt]] = []
          scala> jl.add(new java.util.HashSet[JInt])
          res0: Boolean = true
          scala> jl.get(0).add(23)
          res1: Boolean = true
          scala> jl
          res2: java.util.ArrayList[java.util.Set[com.daodecode.scalaj.collection.JInt]] = [[23]]
          scala> jl.deepAsScalaImmutable
          res3: scala.collection.immutable.Seq[Set[Int]] = Vector(Set(23))

Concrete fields

val javaList: List[A]