以此回想学习《设计模式之禅》的义务链模式。
甚么是义务链模式?
Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it. (为了不要求者与响应者之间的耦合性,让每一个对象都有处置要求的机遇。把这些处置要求的对象连成一条链,并沿着这条链传递要求,直到有对象能够处置这个要求为止)Avoid coupling the