#107 Improve JavaDoc for Null Object example
This commit is contained in:
parent
952ebc638f
commit
2bc23844a4
@ -5,7 +5,7 @@ package com.iluwatar.nullobject;
|
||||
* Null Object pattern replaces null values with neutral objects.
|
||||
* Many times this simplifies algorithms since no extra null checks
|
||||
* are needed.
|
||||
*
|
||||
* <p>
|
||||
* In this example we build a binary tree where the nodes are either
|
||||
* normal or Null Objects. No null values are used in the tree making
|
||||
* the traversal easy.
|
||||
@ -13,6 +13,10 @@ package com.iluwatar.nullobject;
|
||||
*/
|
||||
public class App
|
||||
{
|
||||
/**
|
||||
* Program entry point
|
||||
* @param args command line args
|
||||
*/
|
||||
public static void main( String[] args ) {
|
||||
|
||||
Node root = new NodeImpl("1",
|
||||
|
@ -3,7 +3,7 @@ package com.iluwatar.nullobject;
|
||||
/**
|
||||
*
|
||||
* Null Object implementation for binary tree node.
|
||||
*
|
||||
* <p>
|
||||
* Implemented as Singleton, since all the NullNodes are the same.
|
||||
*
|
||||
*/
|
||||
|
@ -4,6 +4,11 @@ import org.junit.Test;
|
||||
|
||||
import com.iluwatar.nullobject.App;
|
||||
|
||||
/**
|
||||
*
|
||||
* Application test
|
||||
*
|
||||
*/
|
||||
public class AppTest {
|
||||
|
||||
@Test
|
||||
|
Loading…
x
Reference in New Issue
Block a user