提交 1cdb5935 编写于 作者: I Ilkka Seppala

Added comments for proxy example.

上级 05cb4089
package com.iluwatar;
/**
*
* Proxy (WizardTowerProxy) controls access to the
* actual object (WizardTower).
*
*/
public class App
{
public static void main( String[] args )
......
package com.iluwatar;
/**
*
* The object to be proxyed.
*
*/
public class WizardTower {
public void enter(Wizard wizard) {
......
package com.iluwatar;
/**
*
* The proxy controlling access to WizardTower.
*
*/
public class WizardTowerProxy extends WizardTower {
private static final int NUM_WIZARDS_ALLOWED = 3;
......@@ -15,5 +20,4 @@ public class WizardTowerProxy extends WizardTower {
System.out.println(wizard + " is not allowed to enter!");
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册