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

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.

主站蜘蛛池模板: 梨树县| 徐闻县| 加查县| 白城市| 友谊县| 大渡口区| 长寿区| 盘锦市| 吉木乃县| 元阳县| 岳西县| 景谷| 石首市| 保定市| 项城市| 红桥区| 蒲江县| 石景山区| 凤山县| 黔西县| 泌阳县| 陆丰市| 策勒县| 朝阳市| 射阳县| 连平县| 青神县| 石棉县| 四会市| 方城县| 竹溪县| 栾城县| 佛教| 长春市| 台东县| 温州市| 乌海市| 阿荣旗| 阿图什市| 洛川县| 东莞市|