Consider a case class with as many members as possible; to illustrate the case, suppose two arguments, as in
case class C(s1: String, s2: String)
and therefore accept an array of at least a few arguments,
val a = Array("a1", "a2")
Then
scala> C(a(0), a(1))
res9: C = c(a1,a2)
However, is there an approach to an instance of the case class when there is no need to refer to each element in the array for any (possibly large) number of predefined class members?
source
share