val list = List(A(None,None,Some("dummyText")),
"DummmyText", None, None, None, None, None, None, Some("322"),
Some("1233"))
I need to convert this to a case class
case class Dummy(code: A, someValue1: String, someValue2: Option[B] = None,
someValue3: Option[B] = None, someValue4: Option[B] = None,
someValue5: Option[B] = None, someValue6: Option[A] = None,
someValue7: Option[List[A]] = None, someValue8: Option[String] = None, someValue9: Option[String] = None)
I tried this Instantiating a case class from a list of parameters
But not working, since my List
has sub types.
Is is possible to convert a List
like this can be converted to a case class
?