Class Singleton<R>

  • All Implemented Interfaces:
    Supplier<R>

    public final class Singleton<R>
    extends Object
    implements Supplier<R>
    Singleton initializer class that uses an internal supplier to supply the singleton instance. The supplier originally checks whether the instanceSupplier has been initialized or not, but after initialization the instance supplier is changed to avoid extra logic execution.