An open API service indexing awesome lists of open source software.

https://github.com/murshidazher/kairos

:octopus: A small library of design patterns, written in Java.
https://github.com/murshidazher/kairos

behavioral-patterns creational-patterns design-patterns interview-preparation java structural-patterns

Last synced: 3 months ago
JSON representation

:octopus: A small library of design patterns, written in Java.

Awesome Lists containing this project

README

          

# Kairos
This repository is a small library which contains Java based real-world examples of many popular design patterns mentioned in the [Gang of Four Book](https://en.wikipedia.org/wiki/Design_Patterns).

:point_up: Note that this project is meant to be used for learning and researching purposes
only and it is **not** meant to be used for production.*

## Design Patterns

A data pattern is a

### Design Patterns by Topic

`B` - Beginner, `A` - Advanced

* **Creational**
* `A` [Abstract Factory](src/com/murshidazher/creational/abstract) - set/get/update/clear bits, multiplication/division by two, make negative etc.
* `B` [Builder Pattern](src/com/murshidazher/creational/builder)
* `B` [Factory Method](src/com/murshidazher/creational/factory) - classic and closed-form versions
* `B` [Singleton](src/com/murshidazher/creational/singleton) (trial division method)
* `B` [Object Pool](src/com/murshidazher/creational/objectPool) - calculate the Greatest Common Divisor (GCD)
* `B` [Prototype](src/com/murshidazher/creational/prototype) (LCM)
* **Structural**
* `B` [Adapter Pattern](src/com/murshidazher/structural/adapter) - product of multiple sets
* `B` [Bridge Pattern](src/com/murshidazher/structural/bridge) - random permutation of a finite sequence
* `A` [Composite Pattern](src/com/murshidazher/structural/composite) - all subsets of a set (bitwise and backtracking solutions)
* `A` [Decorator Pattern](src/com/murshidazher/structural/decorator) (with and without repetitions)
* `A` [Facade Pattern](src/com/murshidazher/structural/facade) (with and without repetitions)
* `A` [Flyweight Pattern](src/com/murshidazher/structural/flyweight) (LCS)
* `A` [Proxy Pattern](src/com/murshidazher/structural/proxy)
* **Behavioral**
* `B` [Chain of Responsibility](src/com/murshidazher/behavioral/chainOfResponsibility) - number of positions at which the symbols are different
* `A` [Command Pattern](src/com/murshidazher/behavioral/command) - minimum edit distance between two sequences
* `A` [Iterator Pattern](src/com/murshidazher/behavioral/iterator) (KMP Algorithm) - substring search (pattern matching)
* `A` [Mediator Pattern](src/com/murshidazher/behavioral/mediator) - substring search (pattern matching)
* `A` [Observer Pattern](src/com/murshidazher/behavioral/memento) - substring search
* `A` [State Pattern](src/com/murshidazher/behavioral/observer)
* `A` [Strategy Pattern](src/com/murshidazher/behavioral/state)
* `A` [Template Method](src/com/murshidazher/behavioral/template)
* `A` [Visitor Pattern](src/com/murshidazher/behavioral/visitor)