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

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.

主站蜘蛛池模板: 巴青县| 兴文县| 河池市| 兴国县| 合阳县| 南开区| 海兴县| 苏尼特右旗| 米泉市| 大石桥市| 资中县| 遂溪县| 龙门县| 永福县| 建德市| 湖州市| 赣州市| 赣州市| 商河县| 高青县| 诏安县| 青岛市| 安阳市| 建平县| 丹东市| 鄂温| 工布江达县| 亚东县| 万州区| 莎车县| 彰化县| 惠来县| 抚顺县| 贵南县| 鄢陵县| 温宿县| 安阳县| 离岛区| 沙湾县| 金寨县| 曲阳县|