Scala Design Patterns.
上QQ阅读APP看书,第一时间看更新

The singleton design pattern

This design pattern restricts the creation of a specific class to just one object. If more than one class in the application tries to use such an instance, then this same instance is returned for everyone. This is another design pattern that can be easily achieved with the use of basic Scala features.