Scala可以区分主构造函数和0个或多个辅助构造函数。
Scala distinguishes between a primary constructor and zero or more auxiliary constructors.
它调用主构造函数,并且传入Nil (Nil表示了一个空的List对象)。
It calls the primary constructor with Nil (which represents an empty List object).
主构造函数,类的主题,有一个参数列表来接受标签字符串和回调函数的列表。
The primary constructor, which is the body of the entire class, has a parameter list that takes a label string and a list of callback functions.
应用推荐