I want to create a Scala class where one of its var is read-only from outside the class, but still a var. How can I do it?
If it was a val, there was no need to do anything. By default, the definition implies public access and read-only.
Define a public "getter" to a private