Merge pull request #532 from leogtzr/master
Adding initialization-on-demand idiom and noninstantiable class instead of interface constant idiom
This commit is contained in:
@ -27,16 +27,16 @@ package com.iluwatar.singleton;
|
||||
*/
|
||||
public final class IvoryTower {
|
||||
|
||||
/**
|
||||
* Static to class instance of the class.
|
||||
*/
|
||||
private static final IvoryTower INSTANCE = new IvoryTower();
|
||||
|
||||
/**
|
||||
* Private constructor so nobody can instantiate the class.
|
||||
*/
|
||||
private IvoryTower() {}
|
||||
|
||||
/**
|
||||
* Static to class instance of the class.
|
||||
*/
|
||||
private static final IvoryTower INSTANCE = new IvoryTower();
|
||||
|
||||
/**
|
||||
* To be called by user to obtain instance of the class.
|
||||
*
|
||||
|
Reference in New Issue
Block a user