Scala class with (mutable) var parameter