aboutsummaryrefslogtreecommitdiffstats
path: root/ui-console/src/main/java/market/guess/ui/console/command/ExitMenuCommand.java
blob: 4fcc44891fc790a4773b9422fe52f248d9b0e7e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package market.guess.ui.console.command;

import market.guess.ui.console.io.InputProcessor;

public final class ExitMenuCommand implements MenuCommand {
  private final InputProcessor io;

  public ExitMenuCommand(InputProcessor io) {
    super();
    this.io = io;
  }

  @Override
  public int getIndex() {
    return 6;
  }

  @Override
  public String getName() {
    return "Exit";
  }

  @Override
  public boolean isExit() {
    return true;
  }

  @Override
  public void execute() {
    io.println("Goodbye.");
  }
}