摘要: 单例 A single-element enum type is often the best way to implement a singleton. 单元素的枚举类型已经成为实现Singleton的最佳方法。 一般有两种方式,对于比较简单的效果实现,可以直接在枚举里写方法。 public en 阅读全文
posted @ 2020-07-26 12:17 刃牙 阅读(400) 评论(0) 推荐(0) 编辑