#107 Improve JavaDoc for Lazy Loading example
This commit is contained in:
@ -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
|
||||||
|
@ -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 {
|
||||||
|
@ -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
|
||||||
|
Reference in New Issue
Block a user