DeepArrayAsJavaArray

com.daodecode.scalaj.collection.package$.DeepArrayAsJavaArray
final implicit class DeepArrayAsJavaArray[A](val array: Array[A]) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

def deepAsJava[B : ClassTag](implicit evidence$2: ClassTag[B], converter: JConverter[A, B]): Array[B]

Converts given array of A to array of B. Elements inside array are converted using given implicit converter, which allows to convert nested Scala collections and primitives.

Converts given array of A to array of B. Elements inside array are converted using given implicit converter, which allows to convert nested Scala collections and primitives.

Type parameters

B

New type of resulting array elements

Value parameters

converter

Implicit converter to convert from A to B

Attributes

Returns

Same array if elements of given array are primitives or anything but supported Scala collections, new array otherwise Example:

          scala> val la = Array(Set(1L), Set(2L, 3L))
          la: Array[scala.collection.immutable.Set[Long]] = Array(Set(1), Set(2, 3))
          scala> la.deepAsJava
          res0: Array[com.daodecode.scalaj.collection.JSet[com.daodecode.scalaj.collection.JLong]] = Array([1], [2, 3])

Concrete fields

val array: Array[A]