X Tutup
Skip to content

Commit 1cdb593

Browse files
committed
Added comments for proxy example.
1 parent 05cb408 commit 1cdb593

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

proxy/src/main/java/com/iluwatar/App.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
package com.iluwatar;
22

3+
/**
4+
*
5+
* Proxy (WizardTowerProxy) controls access to the
6+
* actual object (WizardTower).
7+
*
8+
*/
39
public class App
410
{
511
public static void main( String[] args )

proxy/src/main/java/com/iluwatar/WizardTower.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
package com.iluwatar;
22

3+
/**
4+
*
5+
* The object to be proxyed.
6+
*
7+
*/
38
public class WizardTower {
49

510
public void enter(Wizard wizard) {

proxy/src/main/java/com/iluwatar/WizardTowerProxy.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
package com.iluwatar;
22

3+
/**
4+
*
5+
* The proxy controlling access to WizardTower.
6+
*
7+
*/
38
public class WizardTowerProxy extends WizardTower {
49

510
private static final int NUM_WIZARDS_ALLOWED = 3;
@@ -15,5 +20,4 @@ public void enter(Wizard wizard) {
1520
System.out.println(wizard + " is not allowed to enter!");
1621
}
1722
}
18-
1923
}

0 commit comments

Comments
 (0)
X Tutup