Add final to case classes
This commit is contained in:
@@ -8,7 +8,7 @@ import parse.Parser.parseLine
|
|||||||
|
|
||||||
object Aggregate {
|
object Aggregate {
|
||||||
|
|
||||||
case class UserQuery(
|
final case class UserQuery(
|
||||||
cities: List[String],
|
cities: List[String],
|
||||||
field: String,
|
field: String,
|
||||||
key: AggregateKey
|
key: AggregateKey
|
||||||
@@ -45,10 +45,10 @@ object Aggregate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sealed trait AggregateValue
|
sealed trait AggregateValue
|
||||||
case class DoubleValue(value: Double) extends AggregateValue
|
final case class DoubleValue(value: Double) extends AggregateValue
|
||||||
case class ListOptionValue(list: List[Option[Double]]) extends AggregateValue
|
final case class ListOptionValue(list: List[Option[Double]]) extends AggregateValue
|
||||||
case class StringListList(list: List[List[String]]) extends AggregateValue
|
final case class StringListList(list: List[List[String]]) extends AggregateValue
|
||||||
case class DistinctStringList(list: List[String]) extends AggregateValue
|
final case class DistinctStringList(list: List[String]) extends AggregateValue
|
||||||
object AggregateValue {
|
object AggregateValue {
|
||||||
def getKeys: List[String] = {
|
def getKeys: List[String] = {
|
||||||
val runtimeMirror = scala.reflect.runtime.currentMirror
|
val runtimeMirror = scala.reflect.runtime.currentMirror
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ import java.time.LocalDateTime
|
|||||||
import scala.reflect.runtime.universe._
|
import scala.reflect.runtime.universe._
|
||||||
|
|
||||||
|
|
||||||
case class WeatherStationData(
|
final case class WeatherStationData(
|
||||||
city: String,
|
city: String,
|
||||||
timestamp: LocalDateTime,
|
timestamp: LocalDateTime,
|
||||||
weather: WeatherData,
|
weather: WeatherData,
|
||||||
)
|
)
|
||||||
|
|
||||||
case class WeatherData(
|
final case class WeatherData(
|
||||||
tempMax: Option[Double],
|
tempMax: Option[Double],
|
||||||
tempMin: Option[Double],
|
tempMin: Option[Double],
|
||||||
tempAvg: Option[Double],
|
tempAvg: Option[Double],
|
||||||
|
|||||||
Reference in New Issue
Block a user