Decorator pattern: SmartTroll should be SmartHostile #264

This commit is contained in:
Tom.TH.Lin
2016-01-04 23:07:33 +08:00
parent 4c5f9ae44c
commit 30ca1ea1fb
5 changed files with 41 additions and 24 deletions

View File

@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<class-diagram version="1.1.8" icons="true" automaticImage="PNG" always-add-relationships="false" generalizations="true"
realizations="true" associations="true" dependencies="false" nesting-relationships="true">
<class-diagram version="1.1.9" icons="true" always-add-relationships="false" generalizations="true" realizations="true"
associations="true" dependencies="false" nesting-relationships="true" router="FAN">
<interface id="1" language="java" name="com.iluwatar.decorator.Hostile" project="decorator"
file="/decorator/src/main/java/com/iluwatar/decorator/Hostile.java" binary="false" corner="BOTTOM_RIGHT">
<position height="106" width="134" x="116" y="408"/>
<position height="-1" width="-1" x="554" y="188"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</interface>
<class id="2" language="java" name="com.iluwatar.decorator.SmartTroll" project="decorator"
file="/decorator/src/main/java/com/iluwatar/decorator/SmartTroll.java" binary="false" corner="BOTTOM_RIGHT">
<position height="124" width="134" x="116" y="244"/>
<class id="2" language="java" name="com.iluwatar.decorator.App" project="decorator"
file="/decorator/src/main/java/com/iluwatar/decorator/App.java" binary="false" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="117" y="202"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
@ -21,29 +21,46 @@
</class>
<class id="3" language="java" name="com.iluwatar.decorator.Troll" project="decorator"
file="/decorator/src/main/java/com/iluwatar/decorator/Troll.java" binary="false" corner="BOTTOM_RIGHT">
<position height="124" width="134" x="290" y="244"/>
<position height="-1" width="-1" x="315" y="100"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<realization id="4">
<class id="4" language="java" name="com.iluwatar.decorator.SmartHostile" project="decorator"
file="/decorator/src/main/java/com/iluwatar/decorator/SmartHostile.java" binary="false" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="318" y="315"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>
<operations public="true" package="true" protected="true" private="true" static="true"/>
</display>
</class>
<dependency id="5">
<end type="SOURCE" refId="2"/>
<end type="TARGET" refId="4"/>
</dependency>
<realization id="6">
<end type="SOURCE" refId="3"/>
<end type="TARGET" refId="1"/>
</realization>
<association id="5">
<end type="SOURCE" refId="2" navigable="false">
<attribute id="6" name="decorated"/>
<multiplicity id="7" minimum="0" maximum="1"/>
<association id="7">
<end type="SOURCE" refId="4" navigable="false">
<attribute id="8" name="decorated"/>
<multiplicity id="9" minimum="0" maximum="1"/>
</end>
<end type="TARGET" refId="1" navigable="true"/>
<display labels="true" multiplicity="true"/>
</association>
<realization id="8">
<end type="SOURCE" refId="3"/>
<realization id="10">
<end type="SOURCE" refId="4"/>
<end type="TARGET" refId="1"/>
</realization>
<dependency id="11">
<end type="SOURCE" refId="2"/>
<end type="TARGET" refId="3"/>
</dependency>
<classifier-display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 29 KiB