DeepJavaListAsMutableBuffer

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

****************************************** deepAsScala converters *******************************************

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

def deepAsScala[B](implicit converter: SConverter[A, B]): Buffer[B]

Converts given Java JList to mutable Scala scala.collection.mutable.Buffer Elements inside list are converted using given implicit converter, which allows to convert nested Java collections and primitives.

Converts given Java JList to mutable Scala scala.collection.mutable.Buffer Elements inside list are converted using given implicit converter, which allows to convert nested Java collections and primitives.

Type parameters

B

New type of resulting Buffer elements

Value parameters

converter

Implicit converter to convert from A to B.

Attributes

Returns

Scala wrapper around given list if given list elements are primitives or anything but supported Java collections. Wrapper around new list otherwise. 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.deepAsScala
          res3: scala.collection.mutable.Buffer[scala.collection.mutable.Set[Int]] = ArrayBuffer(Set(23))

Concrete fields

val javaList: List[A]