A cookbook of commonly used Java design patterns based on examples from:
- "Design Patterns: Elements of Reusable Object-Oriented Software" - Gamma et al
- "Head First Design Patterns" - Freeman et al
- "Java Design Pattern Essentials" - Tony Brevis
Each pattern is contained in its own package. The Javadoc will provide more details and the unit tests will demonstrate how to use it.
Any comments/bugs/better ways of doing things, send 'em my way.
- State
- Chain of Responsibility
- Strategy
- Observer
- Command
- Template Method
- Visitor
- Builder
- Factory Method
- Static Factory Method / Simple Factory Method
- Abstract Factory
- Singleton
- Adapter
- Decorator
- Facade
You'll need JDK 21+ installed on your dev box.
You can use the included Gradle wrapper to build the project and pull down the dependencies:
./gradlew build
The Javadoc can be found in the <project-root>/build/docs/javadoc
folder after you execute the build.
You can use the included Maven wrapper to build the project and pull down the dependencies:
./mvnw clean install
The Javadoc can be found in the <project-root>/target/apidocs
folder after you execute the build.
Issues and new features are managed using the project Issue Tracker - submit bugs here.
You are welcome to take on new features or fix bugs! See here for how to get involved.