1 changed files with 0 additions and 23 deletions
@ -1,23 +0,0 @@ |
|||
package com.example.moviecli.command; |
|||
|
|||
import com.example.moviecli.repository.MovieRepository; |
|||
import com.example.moviecli.view.ConsoleView; |
|||
|
|||
public class ExitCommand implements Command { |
|||
private final ConsoleView view; |
|||
|
|||
public ExitCommand(ConsoleView view) { |
|||
this.view = view; |
|||
} |
|||
|
|||
@Override |
|||
public String getName() { |
|||
return "exit"; |
|||
} |
|||
|
|||
@Override |
|||
public void execute(String[] args, MovieRepository repository) { |
|||
view.printSuccess("再见!"); |
|||
System.exit(0); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue