Package design.pattern.behavioural


package design.pattern.behavioural
  • Interfaces
    Class
    Description
    ChainOfResponsibility will be used to decouple the sender of request and the handler of request so that multiple handler can process the request and then pass the request to next handler
    Command will be used to replace a method with an object and parameters by the object fields so that we can handle them in after some time or make another thread execute it.
    Interpreter is used when it is needed to process a simple language with rules or grammar
    Iterator is used to iterate sequentially over aggregate objects without exposing the internal collection used
    Mediator is used to decouple the communication between the objects and let mediator object to handle the communication between group of objects
    Memento will be used to snapshot an object's state, and then it can be used to restore the state at later point with the help of Command.
    NullObject is used to represent absence of real object as a do nothing object
    Observer is used to define one-to-many dependency between objects which are interested in the state of object
    State is used when the behaviour of the object is completely depend on the internal state of the object
    Strategy is used to encapsulate the algorithms in different classes which can be configured in the context class
    TemplateMethod is used to define the skeleton of algorithm in base class and which can be implemented in steps on the subclasses
    Visitor is used to add new operations that work on objects without modifying class definitions