Ensure that a class only have one instance at anytime.
Recognized by a method always returns the same object instance every time.
There a three common and effective implementation for this pattern in Java:
- Eager: Use static initialization to ensure one instance. It is eager initialization, so it could be bad if the object too heavy.
- Lazy: Similar to Eager, but there is a holder to hold instance to avoid eager initialization. Instance only is created whenever the get instance method is called.
- Enum: This is a trick way use Enum type to ensure one instance and simple implementation. This style is introduced in "Effective Java" book
An application must have only one Configuration instance at anytime.

