Design Pattern: Memento Pattern in Java

Memento pattern is used to store the history of state changes of an object so that that history can be used to track back the change or be used for some other purpose. This article demonstrates Memento pattern implementations in Java.

Design Pattern: Mediator Pattern in Java

Mediator pattern is used to restrict direct interaction between objects. A mediator class works as the middleman/communicator when one object wants to connect/use another object. This article demonstrates Mediator pattern implementations in Java. Check the following examples.

Design Pattern: Mediator Pattern

Mediator pattern prevents direct interaction between objects and works as a middleman. As objects can not refer to another object directly in this pattern, that’s why it ensures loose coupling. In Mediator pattern, all communication between objects will be through the Mediator.

Design Pattern: Iterator Pattern

Iterator pattern is used when we need to traverse through a list of items. Iterator pattern hides the complexity of the iteration process and makes it easier to go through a list of items.

Design Pattern: Interpreter Pattern

Interpreter pattern is used when we need to represent some language expression or syntax in an Object-Oriented way. Like representing some logical operation or SQL syntax.Based on the implementation this design pattern can evaluate a specific language syntax, and provide the desired response.

Design Pattern: Interpreter Pattern in Java

Interpreter pattern is used to represent any language operation in Object Oriented Programming context. This article demonstrates Interpreter pattern implementations in Java.

Design Pattern: Command Pattern in Java

Command pattern is used to encapsulate/wrap a command in an object so that the object can be sent as a parameter and can be used in other places. This article demonstrates Command pattern implementations in Java. Check the following examples.

Design Pattern: Command Pattern

Command pattern wraps a request/command in an object. Then we can pass the object anywhere and later when we want to execute the command the object can be used.

Design Pattern: Chain of Responsibility Pattern in Java

Chain of Responsibility pattern is used to decouple the request and response handling. Multiple objects create a chain that is used to handle a request. This article demonstrates Chain of Responsibility pattern implementations in Java. Check the following examples.