学习设计形式之Chain of Responsibility模式(责任链模式)

学习设计模式之Chain of Responsibility模式(责任链模式)引用下某大的文章:设计模式 写道package com.xuyi

学习设计模式之Chain of Responsibility模式(责任链模式)

引用下某大的文章:

设计模式 写道

package com.xuyi.responsibility;//Chain of Responsibility模式(责任链模式)public class Test {public static void main(String[] args) {HandleBoon handleBoon = new HandleBoon();HandleInsure handleInsure = new HandleInsure();HandleFinance handleFinance = new HandleFinance();//装载链条handleBoon.setOtherHandle(handleInsure);handleInsure.setOtherHandle(handleFinance);//发出请求Request request = new Request();request.setType("医保");handleBoon.handleRequest(request);}}?