Scala: is it possible to override default case class constructor?

Posted by adam77 on Stack Overflow See other posts from Stack Overflow or by adam77
Published on 2010-04-18T03:11:58Z Indexed on 2010/04/18 3:23 UTC
Read the original article Hit count: 310

Filed under:
|

Just wondering if this is possible. What I would actually like to do is check and possibly modify one of the arguments before it is stored as a val.

Alternatively, I could use an overload and make the default constructor private. In which case I would also like to make private the default factory constructor in the companion object, how would I do that?

Many thanks.

Adam

© Stack Overflow or respective owner

Related posts about scala

Related posts about scala-2.8