If you need to understand what is the magic Product then google up Algebraic Data Types and learn it together with what is Sum type. One option is http://www.stephanboyer.com/post/18/algebraic-data-types
Enjoy, Petr On Wed, Sep 23, 2015 at 9:07 AM, Petr Novak <oss.mli...@gmail.com> wrote: > I'm unsure if it completely equivalent to a case class and if it has some > limitations compared to case class or if it needs some more methods > implemented. > > Petr > > On Wed, Sep 23, 2015 at 9:04 AM, Petr Novak <oss.mli...@gmail.com> wrote: > >> You can implement your own case class supporting more then 22 fields. It >> is something like: >> >> class MyRecord(val val1: String, val val2: String, ... more then 22, in this >> case f.e. 26) >> extends Product with Serializable { >> >> def canEqual(that: Any): Boolean = that.isInstanceOf[MyRecord] >> >> def productArity: Int = 26 // example value, it is amount of arguments >> >> def productElement(n: Int): Serializable = n match { >> case 1 => val1 >> case 2 => val2 >> //... cases up to 26 >> } >> } >> >> You can google it for more details. >> >> Petr >> > >