mirror of
https://github.com/jlengrand/design-patterns.git
synced 2026-03-10 08:11:17 +00:00
Forgot one file ^^
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package nl.lengrand.patterns.command.commands;
|
||||
|
||||
import nl.lengrand.patterns.command.apis.GarageDoor;
|
||||
|
||||
public class GarageDoorOpen implements Command{
|
||||
|
||||
private GarageDoor garageDoor = new GarageDoor();
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
garageDoor.open();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo() {
|
||||
garageDoor.close();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user