- Kotlin Standard Library Cookbook
- Samuel Urbanowicz
- 38字
- 2021-07-23 19:05:55
How to do it...
- Declare an extension function returning the id property of the LightBulb class:
operator fun LightBulb.component1() = this.id
- Add another extension componentN function responsible for returning the turnedOn property:
operator fun LightBulb.component2() = this.turnedOn
推薦閱讀
- Learning Microsoft Windows Server 2012 Dynamic Access Control
- ThinkPHP 5實(shí)戰(zhàn)
- JavaScript修煉之道
- Vue.js快速入門與深入實(shí)戰(zhàn)
- 數(shù)據(jù)結(jié)構(gòu)簡明教程(第2版)微課版
- Learning Firefox OS Application Development
- Raspberry Pi 2 Server Essentials
- Unity Shader入門精要
- Nexus規(guī)模化Scrum框架
- Python算法從菜鳥到達(dá)人
- Python編程實(shí)戰(zhàn)
- Instant PHP Web Scraping
- Test-Driven JavaScript Development
- Three.js權(quán)威指南:在網(wǎng)頁上創(chuàng)建3D圖形和動(dòng)畫的方法與實(shí)踐(原書第4版)
- AutoCAD基礎(chǔ)教程