package com.iluwatar.chain;

/**
 * 
 * Chain of Responsibility organizes request handlers ({@link RequestHandler}) into a
 * chain where each handler has a chance to act on the request on its turn. In
 * this example the king ({@link OrcKing}) makes requests and the military orcs
 * ({@link OrcCommander}, {@link OrcOfficer}, {@link OrcSoldier}) form the handler chain.
 * 
 */
public class App {

	/**
	 * Program entry point
	 * @param args command line args
	 */
	public static void main(String[] args) {

		OrcKing king = new OrcKing();
		king.makeRequest(new Request(RequestType.DEFEND_CASTLE, "defend castle"));
		king.makeRequest(new Request(RequestType.TORTURE_PRISONER,
				"torture prisoner"));
		king.makeRequest(new Request(RequestType.COLLECT_TAX, "collect tax"));

	}
}

@@ -32,16 +32,20 @@
 *%0A * %0A *
+ The
  Chain o
@@ -65,17 +65,407 @@
 ity 
-organizes
+pattern is a design pattern consisting of command %0A * objects and a series of processing objects. Each processing object contains %0A * logic that defines the types of command objects that it can handle; the rest are %0A * passed to the next processing object in the chain. A mechanism also exists for %0A * adding new processing objects to the end of this chain.%0A * %3Cp%3E%0A * In this example we organize the
  req
@@ -590,26 +590,15 @@
 rn. 
-In%0A * this example
+Here%0A *
  the
@@ -657,19 +657,16 @@
 ary orcs
-%0A *
  (%7B@link
@@ -677,24 +677,28 @@
 Commander%7D, 
+%0A * 
 %7B@link OrcOf

Improve Chain Javadoc