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

Summary

We looked at three creational design patterns—Singleton, Factory method, and builder— specifically the rationale behind them and the Java implementations. We also learnt about a special singleton—Null Object. We saw how Scala helps avoid null using Options. We looked at multiple Scala idioms with respect to Options and saw how Options as a container theme helps. We also saw the special apply method and learned how this syntactic sugar sweetens the code. Finally we looked at builders—a design pattern for creating objects with many attributes. We also saw how Scala's case classes help us with the creation of objects having many attributes. Take a deep breath readers, grab a cup of your favorite hot beverage and settle down to read about recursion.

主站蜘蛛池模板: 维西| 中阳县| 环江| 广饶县| 屏南县| 沽源县| 崇州市| 迁安市| 盐城市| 衡阳市| 井研县| 和平区| 镇平县| 汉中市| 呼伦贝尔市| 石河子市| 永寿县| 慈利县| 开江县| 井研县| 锦屏县| 白河县| 凤冈县| 云南省| 保亭| 乐都县| 时尚| 海晏县| 罗源县| 阜新市| 凌海市| 沁阳市| 弥勒县| 普格县| 修文县| 卢氏县| 正定县| 伊通| 陕西省| 祁东县| 区。|