Improved comments for the facade example.
This commit is contained in:
@ -3,6 +3,7 @@ package com.iluwatar;
|
||||
/**
|
||||
*
|
||||
* Facade (DwarvenGoldmineFacade) provides simpler interface to subsystem.
|
||||
* http://en.wikipedia.org/wiki/Facade_pattern
|
||||
*
|
||||
*/
|
||||
public class App {
|
||||
|
@ -1,5 +1,10 @@
|
||||
package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* DwarvenCartOperator is one of the goldmine subsystems.
|
||||
*
|
||||
*/
|
||||
public class DwarvenCartOperator extends DwarvenMineWorker {
|
||||
|
||||
@Override
|
||||
|
@ -1,5 +1,10 @@
|
||||
package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* DwarvenGoldDigger is one of the goldmine subsystems.
|
||||
*
|
||||
*/
|
||||
public class DwarvenGoldDigger extends DwarvenMineWorker {
|
||||
|
||||
@Override
|
||||
|
@ -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;
|
||||
|
@ -1,5 +1,10 @@
|
||||
package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* DwarvenMineWorker is one of the goldmine subsystems.
|
||||
*
|
||||
*/
|
||||
public abstract class DwarvenMineWorker {
|
||||
|
||||
public void goToSleep() {
|
||||
|
@ -1,5 +1,10 @@
|
||||
package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* DwarvenTunnelDigger is one of the goldmine subsystems.
|
||||
*
|
||||
*/
|
||||
public class DwarvenTunnelDigger extends DwarvenMineWorker {
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user