- 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.
推薦閱讀
- Oracle從入門到精通(第3版)
- 兩周自制腳本語言
- vSphere High Performance Cookbook
- Vue.js 2 and Bootstrap 4 Web Development
- C# 從入門到項目實踐(超值版)
- 利用Python進行數據分析
- Hands-On Nuxt.js Web Development
- Android嵌入式系統程序開發:基于Cortex-A8(第2版)
- Deep Learning with R Cookbook
- 現代CPU性能分析與優化
- Python Social Media Analytics
- 網頁設計與制作
- 零基礎學編程系列(全5冊)
- Python量子計算實踐:基于Qiskit和IBM Quantum Experience平臺
- Ionic Framework By Example