decorator
A wrapper that adds behavior to an object while looking like the same kind of object.
A decorator implements the same interface as the object it wraps and adds behavior around calls; an adapter wraps an object to expose a different interface.
Examples
A
CachingRatesClientthat implementsIRatesClient, wraps the real one, and remembers answers for a minute.
See also