官术网_书友最值得收藏!

Summary

In this chapter, we learned when and how to use design patterns from the Creational family. We learned about different usages of the object keyword: as Singleton, as a container for the Static Factory Methods, and as an anonymous implementation of an interface. We then saw the workings of the destructuring declaration and generics in Kotlin with the use of the in, outand where keywords. We also learned about the default parameter values and named arguments, followed by the copy() function for data classes.

In the next chapter, we'll cover the second family of design patterns, Structural patterns. Those patterns help extend the functionality of our objects.

主站蜘蛛池模板: 澳门| 达孜县| 鲁山县| 丽水市| 二手房| 临夏市| 赤水市| 乌拉特前旗| 禹城市| 武邑县| 新泰市| 宿迁市| 六枝特区| 启东市| 象州县| 晋州市| 樟树市| 大悟县| 泾阳县| 西乌| 屏南县| 东平县| 南岸区| 永胜县| 麦盖提县| 华池县| 汽车| 依安县| 鸡西市| 抚松县| 肥西县| 沧州市| 阳新县| 丰顺县| 雷山县| 遂宁市| 望谟县| 梅州市| 上犹县| 九江县| 岑巩县|