I have defined this function:
def getArrayChannelData(row: IndexedChannelRow): Array[ChannelArrayRow] = {
// We ignore the array if readoutValue is not set
val value: Array[java.lang.Double] = row.readoutValue match {
case Some(readoutValue) => try { readoutValue.getConvertedArrayValues match {
// The array is expanded into rows
case array: Array[java.lang.Double] => array
val offset: Int = try { row.channel.getOffset } catch { case _:Throwable => 0 }
val hashId = "asdf"
val rowIndex = 123
> ChannelArrayRow(hashId, row.docId, getChannelId(row), offset, System.currentTimeMillis, rowIndex, Some(value))
>
> // The object is not an array
> case _ => Array()
> }} catch { case _:Throwable => Array() }
> case None => Array()
> }
> }
With:
case class ChannelArrayRow(
hashId: String,
docId: Long,
channelId: String,
offset: Int,
created: Long,
index: Int,
value: Option[Array[Double]]
)
And i recive this error, "rror: type mismatch;
found : Array[java.lang.Double]
required: Array[scala.Double]
ChannelArrayRow(hashId, row.docId, getChannelId(row), offset, System.currentTimeMillis, rowIndex, Some(value))"