cleaning up some sentences. better flow
This commit is contained in:
parent
894b2614ed
commit
e9d096e411
@ -157,15 +157,15 @@ be treated exactly as a ``Component`` when it comes time to
|
|||||||
persisting it.
|
persisting it.
|
||||||
|
|
||||||
The ``Decorator's`` constructor accepts an instance of a
|
The ``Decorator's`` constructor accepts an instance of a
|
||||||
``Component``, as defined by the ``Decorator`` pattern (using
|
``Component``, as defined by the ``Decorator`` pattern. The
|
||||||
constructor injection). The setDecorates/getDecorates methods have
|
setDecorates/getDecorates methods have been defined as protected to
|
||||||
been defined as protected to hide the fact that a ``Decorator`` is
|
hide the fact that a ``Decorator`` is decorating a ``Component`` and
|
||||||
decorating a ``Component`` and keeps the ``Component`` interface and
|
keeps the ``Component`` interface and the ``Decorator`` interface
|
||||||
the ``Decorator`` interface identical.
|
identical.
|
||||||
|
|
||||||
To illustrate the purpose of the ``Decorator`` pattern, the getName()
|
To illustrate the intended result of the ``Decorator`` pattern, the
|
||||||
method has been overridden to append a string to the ``Component's``
|
getName() method has been overridden to append a string to the
|
||||||
getName() method.
|
``Component's`` getName() method.
|
||||||
|
|
||||||
ConcreteDecorator
|
ConcreteDecorator
|
||||||
-----------------
|
-----------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user