You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
644 B
27 lines
644 B
package com.example.datacollect.command;
|
|
|
|
import com.example.datacollect.model.Article;
|
|
import com.example.datacollect.view.ConsoleView;
|
|
import java.util.List;
|
|
|
|
/**
|
|
* 查看历史命令
|
|
*/
|
|
public class History implements Command {
|
|
private HistoryCommand historyCommand;
|
|
|
|
public History(HistoryCommand historyCommand) {
|
|
this.historyCommand = historyCommand;
|
|
}
|
|
|
|
@Override
|
|
public String getName() {
|
|
return "history";
|
|
}
|
|
|
|
@Override
|
|
public void execute(String[] args, List<Article> articles) {
|
|
ConsoleView view = new ConsoleView();
|
|
historyCommand.showHistory(view, articles);
|
|
}
|
|
}
|
|
|