Is it possible to override a 'val' type on a Scala constructor?
Given a class such as this:
class GPPerson (id: Option[GPID], created: Option[DateTime], active: Boolean, primaryEmail: String)
I'd like to create a constructor that can essentially do this:
if (created == None) created = new DateTime
In other words, if a None value is supplies, replace it with a DateTime instance. The catch is, I'm trying to avoid using a companion object, and the 'created' object needs to be 'val' (can't make it a 'var').