Just formatting App classes to be like the other class files on the project

This commit is contained in:
Matthew
2014-10-07 16:23:37 +01:00
parent 52f0923df9
commit bde5b343d0
24 changed files with 466 additions and 508 deletions

View File

@ -1,23 +1,22 @@
package com.iluwatar;
/**
*
* Visitor pattern defines mechanism to apply operations
* (UnitVisitor) on nodes (Unit) in hierarchy. New operations
* can be added without altering the node interface.
*
* Visitor pattern defines mechanism to apply operations (UnitVisitor) on nodes
* (Unit) in hierarchy. New operations can be added without altering the node
* interface.
*
*/
public class App
{
public static void main( String[] args )
{
public class App {
public static void main(String[] args) {
Commander commander = new Commander(
new Sergeant(new Soldier(), new Soldier(), new Soldier()),
new Sergeant(new Soldier(), new Soldier(), new Soldier()));
commander.accept(new SoldierVisitor());
commander.accept(new SergeantVisitor());
commander.accept(new CommanderVisitor());
Commander commander = new Commander(
new Sergeant(new Soldier(), new Soldier(), new Soldier()),
new Sergeant(new Soldier(), new Soldier(), new Soldier()));
commander.accept(new SoldierVisitor());
commander.accept(new SergeantVisitor());
commander.accept(new CommanderVisitor());
}
}