Patterns Used In Java
2 hours
oojava
designpatterns
Intermediate
developer

Creational patterns

Abstract factory

Builder

Factory Method

Prototype

singleton

Structural patterns


Adapter

Bridge

  • None comes to mind yet. A fictive example would be new LinkedHashMap(LinkedHashSet<K>, List<V>) which returns an unmodifiable linked map which doesn't clone the items, but uses them. The java.util.Collections#newSetFromMap() and singletonXXX() methods however comes close.

Composite

Decorator

Facade

Flyweight

Proxy

Behavioral patterns


Chain of responsibility

Command

Interpreter

Iterator

Mediator

Memento

Observer

State

Strategy

Template method

Visitor