forked from iluwatar/java-design-patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
292 additions
and
1 deletion.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,212 @@ | ||
<?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 id="1" language="java" name="com.iluwatar.creature.KillerBee" project="specification" | ||
file="/specification/src/main/java/com/iluwatar/creature/KillerBee.java" binary="false" corner="BOTTOM_RIGHT"> | ||
<position height="88" width="127" x="535" y="361"/> | ||
<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> | ||
<enumeration id="2" language="java" name="com.iluwatar.property.Size" project="specification" | ||
file="/specification/src/main/java/com/iluwatar/property/Size.java" binary="false" corner="BOTTOM_RIGHT"> | ||
<position height="178" width="144" x="351" y="361"/> | ||
<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> | ||
</enumeration> | ||
<class id="3" language="java" name="com.iluwatar.creature.Troll" project="specification" | ||
file="/specification/src/main/java/com/iluwatar/creature/Troll.java" binary="false" corner="BOTTOM_RIGHT"> | ||
<position height="88" width="127" x="702" y="361"/> | ||
<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> | ||
<class id="4" language="java" name="com.iluwatar.selector.SizeSelector" project="specification" | ||
file="/specification/src/main/java/com/iluwatar/selector/SizeSelector.java" binary="false" corner="BOTTOM_RIGHT"> | ||
<position height="106" width="154" x="389" y="126"/> | ||
<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> | ||
<class id="5" language="java" name="com.iluwatar.selector.MovementSelector" project="specification" | ||
file="/specification/src/main/java/com/iluwatar/selector/MovementSelector.java" binary="false" corner="BOTTOM_RIGHT"> | ||
<position height="106" width="200" x="149" y="126"/> | ||
<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> | ||
<class id="6" language="java" name="com.iluwatar.creature.Shark" project="specification" | ||
file="/specification/src/main/java/com/iluwatar/creature/Shark.java" binary="false" corner="BOTTOM_RIGHT"> | ||
<position height="88" width="127" x="869" y="361"/> | ||
<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> | ||
<class id="7" language="java" name="com.iluwatar.creature.Dragon" project="specification" | ||
file="/specification/src/main/java/com/iluwatar/creature/Dragon.java" binary="false" corner="BOTTOM_RIGHT"> | ||
<position height="88" width="127" x="1036" y="361"/> | ||
<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> | ||
<class id="8" language="java" name="com.iluwatar.creature.AbstractCreature" project="specification" | ||
file="/specification/src/main/java/com/iluwatar/creature/AbstractCreature.java" binary="false" corner="BOTTOM_RIGHT"> | ||
<position height="-1" width="-1" x="1101" y="222"/> | ||
<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> | ||
<class id="9" language="java" name="com.iluwatar.creature.Octopus" project="specification" | ||
file="/specification/src/main/java/com/iluwatar/creature/Octopus.java" binary="false" corner="BOTTOM_RIGHT"> | ||
<position height="88" width="127" x="1203" y="361"/> | ||
<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> | ||
<class id="10" language="java" name="com.iluwatar.selector.ColorSelector" project="specification" | ||
file="/specification/src/main/java/com/iluwatar/selector/ColorSelector.java" binary="false" corner="BOTTOM_RIGHT"> | ||
<position height="-1" width="-1" x="1647" y="223"/> | ||
<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> | ||
<interface id="11" language="java" name="com.iluwatar.creature.Creature" project="specification" | ||
file="/specification/src/main/java/com/iluwatar/creature/Creature.java" binary="false" corner="BOTTOM_RIGHT"> | ||
<position height="-1" width="-1" x="717" y="223"/> | ||
<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> | ||
<enumeration id="12" language="java" name="com.iluwatar.property.Movement" project="specification" | ||
file="/specification/src/main/java/com/iluwatar/property/Movement.java" binary="false" corner="BOTTOM_RIGHT"> | ||
<position height="178" width="162" x="149" y="361"/> | ||
<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> | ||
</enumeration> | ||
<class id="13" language="java" name="com.iluwatar.creature.Goblin" project="specification" | ||
file="/specification/src/main/java/com/iluwatar/creature/Goblin.java" binary="false" corner="BOTTOM_RIGHT"> | ||
<position height="-1" width="-1" x="1447" y="405"/> | ||
<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> | ||
<enumeration id="14" language="java" name="com.iluwatar.property.Color" project="specification" | ||
file="/specification/src/main/java/com/iluwatar/property/Color.java" binary="false" corner="BOTTOM_RIGHT"> | ||
<position height="-1" width="-1" x="1416" y="223"/> | ||
<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> | ||
</enumeration> | ||
<generalization id="15"> | ||
<end type="SOURCE" refId="1"/> | ||
<end type="TARGET" refId="8"/> | ||
</generalization> | ||
<generalization id="16"> | ||
<end type="SOURCE" refId="6"/> | ||
<end type="TARGET" refId="8"/> | ||
</generalization> | ||
<generalization id="17"> | ||
<end type="SOURCE" refId="3"/> | ||
<end type="TARGET" refId="8"/> | ||
</generalization> | ||
<association id="18"> | ||
<end type="SOURCE" refId="8" navigable="false"> | ||
<attribute id="19" name="size"/> | ||
<multiplicity id="20" minimum="0" maximum="1"/> | ||
</end> | ||
<end type="TARGET" refId="2" navigable="true"/> | ||
<display labels="true" multiplicity="true"/> | ||
</association> | ||
<association id="21"> | ||
<end type="SOURCE" refId="8" navigable="false"> | ||
<attribute id="22" name="movement"/> | ||
<multiplicity id="23" minimum="0" maximum="1"/> | ||
</end> | ||
<end type="TARGET" refId="12" navigable="true"/> | ||
<display labels="true" multiplicity="true"/> | ||
</association> | ||
<generalization id="24"> | ||
<end type="SOURCE" refId="9"/> | ||
<end type="TARGET" refId="8"/> | ||
</generalization> | ||
<association id="25"> | ||
<end type="SOURCE" refId="4" navigable="false"> | ||
<attribute id="26" name="s"/> | ||
<multiplicity id="27" minimum="0" maximum="1"/> | ||
</end> | ||
<end type="TARGET" refId="2" navigable="true"/> | ||
<display labels="true" multiplicity="true"/> | ||
</association> | ||
<association id="28"> | ||
<end type="SOURCE" refId="8" navigable="false"> | ||
<attribute id="29" name="color"/> | ||
<multiplicity id="30" minimum="0" maximum="1"/> | ||
</end> | ||
<end type="TARGET" refId="14" navigable="true"/> | ||
<display labels="true" multiplicity="true"/> | ||
</association> | ||
<generalization id="31"> | ||
<end type="SOURCE" refId="7"/> | ||
<end type="TARGET" refId="8"/> | ||
</generalization> | ||
<realization id="32"> | ||
<end type="SOURCE" refId="8"/> | ||
<end type="TARGET" refId="11"/> | ||
</realization> | ||
<generalization id="33"> | ||
<end type="SOURCE" refId="13"/> | ||
<end type="TARGET" refId="8"/> | ||
</generalization> | ||
<association id="34"> | ||
<end type="SOURCE" refId="5" navigable="false"> | ||
<attribute id="35" name="m"/> | ||
<multiplicity id="36" minimum="0" maximum="1"/> | ||
</end> | ||
<end type="TARGET" refId="12" navigable="true"/> | ||
<display labels="true" multiplicity="true"/> | ||
</association> | ||
<association id="37"> | ||
<end type="SOURCE" refId="10" navigable="false"> | ||
<attribute id="38" name="c"/> | ||
<multiplicity id="39" minimum="0" maximum="1"/> | ||
</end> | ||
<end type="TARGET" refId="14" navigable="true"/> | ||
<display labels="true" multiplicity="true"/> | ||
</association> | ||
<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"/> | ||
<operations public="true" package="true" protected="true" private="true" static="true"/> | ||
</classifier-display> | ||
<association-display labels="true" multiplicity="true"/> | ||
</class-diagram> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
specification/src/main/java/com/iluwatar/property/Movement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
/** | ||
* | ||
* Enumeration for creature size. | ||
* Size property. | ||
* | ||
*/ | ||
public enum Size { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters