Scalaのキャスト - Qiita

型のキャストは、AnyのasInstanceOfメソッドで行います。 val x: Any = 1 val y: Int = x.asInstanceOf[Int] 関連 isInstanceOf