I working with play for scala (2.1) and I need to convert an "Option[Long]" value to "Long".
I know how to do the opposite, I mean:
def toOption[Long](value: Long): Option[Long] = if (value == null) None else Some(value)
But in my case, I have to pass a value of "Option[Long]" as a type into a method that takes "Long". Any help please.
If you have x as Option[Long], x.get
will give you Long.