Improved comments for the facade example.

This commit is contained in:
Ilkka Seppala
2014-12-06 14:43:40 +02:00
parent 9336284814
commit 2be1ced00a
6 changed files with 31 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package com.iluwatar;
/**
*
* Facade (DwarvenGoldmineFacade) provides simpler interface to subsystem.
* http://en.wikipedia.org/wiki/Facade_pattern
*
*/
public class App {

View File

@ -1,5 +1,10 @@
package com.iluwatar;
/**
*
* DwarvenCartOperator is one of the goldmine subsystems.
*
*/
public class DwarvenCartOperator extends DwarvenMineWorker {
@Override

View File

@ -1,5 +1,10 @@
package com.iluwatar;
/**
*
* DwarvenGoldDigger is one of the goldmine subsystems.
*
*/
public class DwarvenGoldDigger extends DwarvenMineWorker {
@Override

View File

@ -3,6 +3,16 @@ package com.iluwatar;
import java.util.ArrayList;
import java.util.List;
/**
*
* DwarvenGoldmineFacade provides a single interface
* through which users can operate the subsystems.
*
* This makes the goldmine easier to operate and
* cuts the dependencies from the goldmine user to
* the subsystems.
*
*/
public class DwarvenGoldmineFacade {
List<DwarvenMineWorker> workers;

View File

@ -1,5 +1,10 @@
package com.iluwatar;
/**
*
* DwarvenMineWorker is one of the goldmine subsystems.
*
*/
public abstract class DwarvenMineWorker {
public void goToSleep() {

View File

@ -1,5 +1,10 @@
package com.iluwatar;
/**
*
* DwarvenTunnelDigger is one of the goldmine subsystems.
*
*/
public class DwarvenTunnelDigger extends DwarvenMineWorker {
@Override