- Hands-On Design Patterns with Kotlin
- Alexey Soshin
- 112字
- 2021-06-25 20:49:31
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, out, and 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.
推薦閱讀
- Advanced Splunk
- Hands-On Data Structures and Algorithms with JavaScript
- Scratch 3游戲與人工智能編程完全自學(xué)教程
- Object-Oriented JavaScript(Second Edition)
- Visual C++串口通信技術(shù)詳解(第2版)
- Learning AndEngine
- Python數(shù)據(jù)可視化之Matplotlib與Pyecharts實(shí)戰(zhàn)
- JavaScript 程序設(shè)計案例教程
- Teaching with Google Classroom
- Android系統(tǒng)原理及開發(fā)要點(diǎn)詳解
- 編程與類型系統(tǒng)
- Unity&VR游戲美術(shù)設(shè)計實(shí)戰(zhàn)
- Java程序設(shè)計與項目案例教程
- JavaScript+jQuery網(wǎng)頁特效設(shè)計任務(wù)驅(qū)動教程
- 零基礎(chǔ)學(xué)Python編程(少兒趣味版)