This project contains practical implementations of the most common and useful design patterns using the Java programming language.
Design patterns are proven solutions to common software design problems. This repository demonstrates patterns categorized by the Gang of Four (GoF) into:
- Creational Patterns
- Structural Patterns
- Behavioral Patterns
Each pattern includes:
- A brief description
- Source code examples
- UML-style comments (when applicable)
- A simple client/demo to illustrate usage
-
Singleton
Ensures a class has only one instance and provides a global access point to it. -
Prototype
Creates object copies efficiently using a cloning interface/abstract class. -
Factory Method
Delegates object creation to subclasses through a common interface. -
Abstract Factory
Provides an interface for creating families of related objects without specifying their concrete classes. -
Builder
Separates complex object construction from its representation.
(Coming soon)
(Coming soon)
Clone the repository:
git clone https://github.com/raisalomao/design-patterns.git