Commented chain of responsibility example.

This commit is contained in:
Ilkka Seppala 2014-08-31 10:52:37 +03:00
parent 1cdb59352d
commit 6b843f028a
2 changed files with 13 additions and 0 deletions

View File

@ -1,5 +1,13 @@
package com.iluwatar;
/**
*
* Chain of Responsibility organizes request handlers (RequestHandler) into
* a chain where each handler has a chance to act on the request on its
* turn. In this example the king (OrcKing) makes requests and the military
* orcs (OrcCommander, OrcOfficer, OrcSoldier) form the handler chain.
*
*/
public class App
{
public static void main( String[] args )

View File

@ -1,5 +1,10 @@
package com.iluwatar;
/**
*
* Makes requests that are handled by the chain.
*
*/
public class OrcKing {
RequestHandler chain;