We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a75cb1 commit 10d4e3cCopy full SHA for 10d4e3c
3 files changed
decorator/src/main/java/com/iluwatar/Hostile.java
@@ -1,5 +1,10 @@
1
package com.iluwatar;
2
3
+/**
4
+ *
5
+ * Interface for the hostile enemies.
6
7
+ */
8
public interface Hostile {
9
10
void attack();
decorator/src/main/java/com/iluwatar/SmartTroll.java
@@ -1,5 +1,12 @@
+ * SmartTroll is a decorator for Hostile objects.
+ * The calls to the Hostile interface are intercepted
+ * and decorated. Finally the calls are delegated
+ * to the decorated Hostile object.
public class SmartTroll implements Hostile {
11
12
private Hostile decorated;
decorator/src/main/java/com/iluwatar/Troll.java
+ * Troll implements Hostile interface directly.
public class Troll implements Hostile {
public void attack() {
0 commit comments