#107 Improve JavaDoc for Lazy Loading example

This commit is contained in:
Ilkka Seppala
2015-08-19 22:09:54 +03:00
parent 48cb04f98a
commit add57d4066
3 changed files with 13 additions and 4 deletions

View File

@ -3,16 +3,20 @@ package com.iluwatar.lazy.loading;
/** /**
* *
* Lazy loading idiom defers object creation until needed. * Lazy loading idiom defers object creation until needed.
* * <p>
* This example shows different implementations of the pattern * This example shows different implementations of the pattern
* with increasing sophistication. * with increasing sophistication.
* * <p>
* Additional information and lazy loading flavours are described in * Additional information and lazy loading flavours are described in
* http://martinfowler.com/eaaCatalog/lazyLoad.html * http://martinfowler.com/eaaCatalog/lazyLoad.html
* *
*/ */
public class App public class App
{ {
/**
* Program entry point
* @param args command line args
*/
public static void main( String[] args ) { public static void main( String[] args ) {
// Simple lazy loader - not thread safe // Simple lazy loader - not thread safe

View File

@ -4,8 +4,8 @@ import java.util.function.Supplier;
/** /**
* *
* This lazy loader is thread safe and more efficient than HolderThreadSafe. * This lazy loader is thread safe and more efficient than {@link HolderThreadSafe}.
* It utilizes Java 8 functional interface Supplier<T> as Heavy factory. * It utilizes Java 8 functional interface {@link Supplier<T>} as {@link Heavy} factory.
* *
*/ */
public class Java8Holder { public class Java8Holder {

View File

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