2018-11-16 22:03:24 +08:00
|
|
|
# Table of contents
|
|
|
|
|
|
|
|
* [README](README.md)
|
2018-12-05 13:58:58 +08:00
|
|
|
* [01. 考虑使用静态工厂方法替代构造方法](01.考虑使用静态工厂方法替代构造方法.md)
|
2018-11-16 22:03:24 +08:00
|
|
|
* [02. 当构造方法参数过多时使用builder模式](02.-dang-gou-zao-fang-fa-can-shu-guo-duo-shi-shi-yong-builder-mo-shi.md)
|
|
|
|
* [03. 使用私有构造方法或枚类实现Singleton属性](03.-shi-yong-si-you-gou-zao-fang-fa-huo-mei-lei-shi-xian-singleton-shu-xing.md)
|
|
|
|
* [04. 使用私有构造方法执行非实例化](04.-shi-yong-si-you-gou-zao-fang-fa-zhi-hang-fei-shi-li-hua.md)
|
|
|
|
* [05. 使用依赖注入取代硬连接资源\(hardwiring resources\)](05.-shi-yong-yi-lai-zhu-ru-qu-dai-ying-lian-jie-zi-yuan-hardwiring-resources.md)
|
|
|
|
* [06. 避免创建不必要的对象](06.-bi-mian-chuang-jian-bu-bi-yao-de-dui-xiang.md)
|
|
|
|
* [07. 消除过期的对象引用](07.-xiao-chu-guo-qi-de-dui-xiang-yin-yong.md)
|
|
|
|
* [08. 避免使用Finalizer和Cleaner机制](08.-bi-mian-shi-yong-finalizer-he-cleaner-ji-zhi.md)
|
|
|
|
* [09. 使用try-with-resources语句替代try-finally语句](09.-shi-yong-trywithresources-yu-ju-ti-dai-tryfinally-yu-ju.md)
|
|
|
|
* [10. 重写equals方法时遵守通用约定](10.-zhong-xie-equals-fang-fa-shi-zun-shou-tong-yong-yue-ding.md)
|
|
|
|
* [11. 重写equals方法时同时也要重写hashcode方法](11.-zhong-xie-equals-fang-fa-shi-tong-shi-ye-yao-zhong-xie-hashcode-fang-fa.md)
|
|
|
|
* [12. 始终重写 toString 方法](12.-shi-zhong-zhong-xie-tostring-fang-fa.md)
|
|
|
|
* [13. 谨慎地重写 clone 方法](13.-jin-shen-di-zhong-xie-clone-fang-fa.md)
|
|
|
|
* [14. 考虑实现Comparable接口](14.-kao-lv-shi-xian-comparable-jie-kou.md)
|
|
|
|
* [15. 使类和成员的可访问性最小化](15.-shi-lei-he-cheng-yuan-de-ke-fang-wen-xing-zui-xiao-hua.md)
|
|
|
|
* [16. 在公共类中使用访问方法而不是公共属性](16.-zai-gong-gong-lei-zhong-shi-yong-fang-wen-fang-fa-er-bu-shi-gong-gong-shu-xing.md)
|
|
|
|
* [17. 最小化可变性](17.-zui-xiao-hua-ke-bian-xing.md)
|
|
|
|
* [18. 组合优于继承](18.-zu-he-you-yu-ji-cheng.md)
|
|
|
|
* [19. 如使用继承则设计,应当文档说明,否则不该使用](19.-ru-shi-yong-ji-cheng-ze-she-ji-ying-dang-wen-dang-shuo-ming-fou-ze-bu-gai-shi-yong.md)
|
|
|
|
* [20. 接口优于抽象类](20.-jie-kou-you-yu-chou-xiang-lei.md)
|
|
|
|
* [21. 为后代设计接口](21.-wei-hou-dai-she-ji-jie-kou.md)
|
|
|
|
* [22. 接口仅用来定义类型](22.-jie-kou-jin-yong-lai-ding-yi-lei-xing.md)
|
|
|
|
* [23. 优先使用类层次而不是标签类](23.-you-xian-shi-yong-lei-ceng-ci-er-bu-shi-biao-qian-lei.md)
|
|
|
|
* [24. 优先考虑静态成员类](24.-you-xian-kao-lv-jing-tai-cheng-yuan-lei.md)
|
|
|
|
* [25. 将源文件限制为单个顶级类](25.-jiang-yuan-wen-jian-xian-zhi-wei-dan-ge-ding-ji-lei.md)
|
|
|
|
* [26. 不要使用原始类型](26.-bu-yao-shi-yong-yuan-shi-lei-xing.md)
|
|
|
|
* [27. 消除非检查警告](27.-xiao-chu-fei-jian-cha-jing-gao.md)
|
|
|
|
* [28. 列表优于数组](28.-lie-biao-you-yu-shu-zu.md)
|
|
|
|
* [29. 优先考虑泛型](29.-you-xian-kao-lv-fan-xing.md)
|
|
|
|
* [30. 优先使用泛型方法](30.-you-xian-shi-yong-fan-xing-fang-fa.md)
|
|
|
|
* [31. 使用限定通配符来增加API的灵活性](31.-shi-yong-xian-ding-tong-pei-fu-lai-zeng-jia-api-de-ling-huo-xing.md)
|
|
|
|
* [32. 合理地结合泛型和可变参数](32.-he-li-di-jie-he-fan-xing-he-ke-bian-can-shu.md)
|
|
|
|
* [33. 优先考虑类型安全的异构容器](33.-you-xian-kao-lv-lei-xing-an-quan-de-yi-gou-rong-qi.md)
|
|
|
|
* [34. 使用枚举类型替代整型常量](34.-shi-yong-mei-ju-lei-xing-ti-dai-zheng-xing-chang-liang.md)
|
|
|
|
|