#107 Improve JavaDoc for Visitor example

This commit is contained in:
Ilkka Seppala
2015-08-21 23:27:25 +03:00
parent 35e1afd7dc
commit d220a0753a
2 changed files with 50 additions and 41 deletions

View File

@ -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(),

View File

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