#107 Improvements for Multiton JavaDoc

This commit is contained in:
Ilkka Seppala 2015-08-20 22:35:57 +03:00
parent e8c8e26c8b
commit 952ebc638f
4 changed files with 14 additions and 5 deletions

View File

@ -6,14 +6,18 @@ package com.iluwatar.multiton;
* accessible object the Multiton pattern defines many globally
* accessible objects. The client asks for the correct instance
* from the Multiton by passing an enumeration as parameter.
*
* In this example Nazgul is the Multiton and we can ask single
* Nazgul from it using NazgulName. The Nazguls are statically
* <p>
* In this example {@link Nazgul} is the Multiton and we can ask single
* {@link Nazgul} from it using {@link NazgulName}. The {@link Nazgul}s are statically
* initialized and stored in concurrent hash map.
*
*/
public class App {
/**
* Program entry point
* @param args command line args
*/
public static void main( String[] args ) {
System.out.println("KHAMUL=" + Nazgul.getInstance(NazgulName.KHAMUL));
System.out.println("MURAZOR=" + Nazgul.getInstance(NazgulName.MURAZOR));

View File

@ -6,7 +6,7 @@ import java.util.concurrent.ConcurrentHashMap;
/**
*
* Nazgul is a Multiton class. Nazgul instances can be queried
* using getInstance() method.
* using {@link #getInstance} method.
*
*/
public class Nazgul {

View File

@ -2,7 +2,7 @@ package com.iluwatar.multiton;
/**
*
* Each Nazgul has different NazgulName.
* Each Nazgul has different {@link NazgulName}.
*
*/
public enum NazgulName {

View File

@ -4,6 +4,11 @@ import org.junit.Test;
import com.iluwatar.multiton.App;
/**
*
* Application test
*
*/
public class AppTest {
@Test