The most iconic way ot do it is to unwrap values with scala is to use pattern matching to unwrap the value.
entities match {
case Some(queryEntities: QueryEntities) =>
queryEntities.entities.foreach { case e =>
println(e.columnFamily)
println(e.fromDate.getOrElse("defaultFromDateHere")
println(e.toDate.getOrElse("defaultToDateHere"))
}
case None => println("No value")
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…