Skip to content

Commit dce1b3c

Browse files
committed
Added JavaDoc for singleton instance method
1 parent f2d8546 commit dce1b3c

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

singleton/src/main/java/com/iluwatar/singleton/IvoryTower.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
*/
2525
package com.iluwatar.singleton;
2626

27-
/** Singleton class. Eagerly initialized static instance guarantees thread safety. */
27+
/**
28+
* Singleton class. Eagerly initialized static instance guarantees thread
29+
* safety.
30+
*/
2831
public final class IvoryTower {
2932

3033
/** Private constructor so nobody can instantiate the class. */
@@ -43,6 +46,11 @@ private IvoryTower() {
4346
*
4447
* @return instance of the singleton.
4548
*/
49+
50+
/**
51+
* Returns the single instance of IvoryTower.
52+
* Ensures that only one instance exists throughout the application.
53+
*/
4654
public static IvoryTower getInstance() {
4755
return INSTANCE;
4856
}

0 commit comments

Comments
 (0)