21 lines
325 B
Java
21 lines
325 B
Java
package com.iluwatar;
|
|
|
|
/**
|
|
*
|
|
* Singleton class.
|
|
* Eagerly initialized static instance guarantees thread
|
|
* safety.
|
|
*
|
|
*/
|
|
public class IvoryTower {
|
|
|
|
private static IvoryTower instance = new IvoryTower();
|
|
|
|
private IvoryTower() {
|
|
}
|
|
|
|
public static IvoryTower getInstance() {
|
|
return instance;
|
|
}
|
|
}
|