📜  产品类型 scala - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:00.083000             🧑  作者: Mango

代码示例1
A product type is generally encoded (scala 2.x) as a:

final case class Foo(field1: Type1,...,fieldN: TypeN)

- it is an immutable persistent data structure 
- equal(), hashcode(), apply(), toString() overloaded