Commented chain of responsibility example.
This commit is contained in:
		@@ -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 )
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,10 @@
 | 
			
		||||
package com.iluwatar;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 
 | 
			
		||||
 * Makes requests that are handled by the chain.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
public class OrcKing {
 | 
			
		||||
 | 
			
		||||
	RequestHandler chain;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user