I am reasonable new to scala and working with scala and Java together.
I am trying to pass a scala Int into a method that accepts an Integer(java.long.Integer). Since they are of different types the compiler gives an error.
/* name- Option[String], id- Option[Integer] , mask- Option[String]*/
new findingFrame(name,id, mask)
case class findingFrame(name: String,
id: Option[java.lang.Integer],
mask : Option[String])
I tried using .instanceOf [java.lang.Integer], but this doesn't work either..
I am not sure how to solve this.. Can somebody help me please? Thank you.
Option[Integer](a strange mixture of a ScalaOptionand a JavaInteger).Option[Integer]and not anInteger. AnOptionis not anInteger, so you cannot cast one to the other.