还可以看到,when关键词定义规则中的条件块,then关键词定义结果块。
You can also see that the when keyword defines the conditional part of a rule, and the then keyword defines the consequence part.
接下来,UnitsConverter也是一个单例模式,因为它是使用object关键词定义的。
Next, UnitsConverter is also a singleton as it is defined using the object keyword.
定义中最后一个关键词是帮助。
应用推荐