Dfgdfg
Abstract Factory
S
Facade
S
Proxy
S
Adapter
C
Factory Method
B
Observer
S
Bridge
S
Flyweight
C
Singleton
C
Builder
B
Interpreter
B
State
B
Chain of Responsibility
B
Iterator
B
Strategy
Memento
Memento
-state
Caretaker
Type: Behavioral
B
Command
What it is:
Without violatingencapsulation, capture
and externalize an object's internal state
so that the object can be restored to this
state later.
Originator
Mediator
B
B
Template Method
-state
B
Visitor
+setMemento(in m : Memento)
+createMemento()
S
Composite
B
Memento
S
Decorator
C
Prototype
successor
«interface»
Handler
Client
+handleRequest()ConcreteHandler1
+handleRequest()
ConcreteHandler2
Chain of Responsibility
«interface»
Subject
Observer
Type: Behavioral
Type: Behavioral
What it is:
Avoid coupling the sender of a request to
its receiver by giving more than one object
a chance to handle the request. Chain the
receiving objects and pass the request
along the chain until an object handles it.
What it is:
Define aone-to-many dependency between
objects so that when one object changes
state, all its dependents are notified and
updated automatically.
notifies
«interface»
Observer
+attach(in o : Observer)
+detach(in o : Observer)
+notify()
ConcreteSubject
+update()
+handleRequest()
ConcreteObserver
observes
-subjectState
-observerState
+update()
Client
InvokerCommand
State
Context
+request()
Type: Behavioral
+execute()
Type: Behavioral
What it is:
Encapsulate a request as an object,
thereby letting you parameterize clients
with different requests, queue or log
requests, and support undoable operations.
ConcreteCommand
What it is:
Allow an object to alter its behavior when
its internal state changes. The object will
appearto change its class.
«interface»
State
+handle()
Command
Receiver
+execute()
+action()
ConcreteState1
ConcreteState2
+handle()
Client
Interpreter
Strategy
Context
Type: Behavioral
«interface»
AbstractExpression
Context
+interpret()
«interface»
Strategy
Type: Behavioral
What it is:
Given a language, define a representation
for its grammaralong with an interpreter
that uses the representation to interpret
sentences in the language.
+handle()
What it is:
Define a family of algorithms,
encapsulate each one, and make them
interchangeable. Lets the algorithm vary
independently from
clients that use it.
+execute()
ConcreteStrategyA
TerminalExpression
+interpret() : Context
ConcreteStrategyB
+execute()NonterminalExpression
+execute()
+interpret() : Context
Client
Iterator
«interface»
Iterator
«interface»
Aggregate
+next()
+createIterator()
Template Method
Type: Behavioral
Type: Behavioral
What it is:
Provide a way to access the elements of
an aggregate object sequentially without
exposing its underlying representation.
What it is:
Define the skeleton ofan algorithm in an
operation, deferring some steps to subclasses.
Lets subclasses redefine certain steps
of an algorithm without changing the
algorithm's structure.
AbstractClass
+templateMethod()
#subMethod()
ConcreteClass
ConcreteIterator
ConcreteAggregate
+createIterator() : Context
+next() : Context
informs
«interface»
Colleague
Mediator
Mediator
Type:Behavioral
What it is:
Define an object that encapsulates how a
set of objects interact. Promotes loose
coupling by keeping objects from referring
to each other explicitly and it lets you vary
their interactions independently.
updates
ConcreteMediator
+subMethod()
ConcreteColleague
Visitor
Type: Behavioral
«interface»
Visitor
Client
+visitElementA(in a : ConcreteElementA)...
Regístrate para leer el documento completo.