#107 Improve JavaDoc for Visitor example
This commit is contained in:
@ -5,15 +5,19 @@ package com.iluwatar.visitor;
|
||||
* Visitor pattern defines mechanism to apply operations on nodes
|
||||
* in hierarchy. New operations can be added without altering the node
|
||||
* interface.
|
||||
*
|
||||
* In this example there is a unit hierarchy beginning from Commander.
|
||||
* This hierarchy is traversed by visitors. SoldierVisitor applies
|
||||
* its operation on Soldiers, SergeantVisitor on Sergeants and so
|
||||
* <p>
|
||||
* In this example there is a unit hierarchy beginning from {@link Commander}.
|
||||
* This hierarchy is traversed by visitors. {@link SoldierVisitor} applies
|
||||
* its operation on {@link Soldier}s, {@link SergeantVisitor} on {@link Sergeant}s and so
|
||||
* on.
|
||||
*
|
||||
*/
|
||||
public class App {
|
||||
|
||||
/**
|
||||
* Program entry point
|
||||
* @param args command line args
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
|
||||
Commander commander = new Commander(new Sergeant(new Soldier(),
|
||||
|
@ -4,6 +4,11 @@ import org.junit.Test;
|
||||
|
||||
import com.iluwatar.visitor.App;
|
||||
|
||||
/**
|
||||
*
|
||||
* Application test
|
||||
*
|
||||
*/
|
||||
public class AppTest {
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user