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

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.

主站蜘蛛池模板: 临城县| 郎溪县| 华蓥市| 宜章县| 马公市| 措勤县| 彭水| 文水县| 沁水县| 环江| 涿鹿县| 利辛县| 河间市| 江阴市| 五常市| 饶阳县| 克山县| 乌兰县| 灵川县| 大理市| 太原市| 松溪县| 教育| 九龙坡区| 漳平市| 华坪县| 厦门市| 洛南县| 曲阜市| 赤峰市| 西充县| 安西县| 永嘉县| 中方县| 临沂市| 仁化县| 乐业县| 梁山县| 赤壁市| 班玛县| 葵青区|