This repository is a collection of Java examples for the GoF Design Patterns. These examples are made in a way to be easy to understand how design patterns work and how they can be implemented in different ways.
GoF Design Patterns are divided into three categories: Creational: The design patterns that deal with the creation of an object. Structural: The design patterns in this category deals with the class structure such as Inheritance and Composition. Behavioral: This type of design patterns provide solution for the better interaction between objects, how to provide lose coupling, and flexibility to extend easily in future.
Included in this reposotory you can find examples for:
-
Creational:
- Abstract Factory
- Factory Method
- Singleton
- Builder
- Prototype
-
Structural:
- Adapter
- Bridge
- Proxy
- Composite
- Decorator
-
Behavioural:
- Command
- Iterator
- Interpreter
- Observer
- Visitor