-
Notifications
You must be signed in to change notification settings - Fork 0
Доработана функциональность по техническому заданию спринта #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,24 +9,45 @@ | |
| import java.util.List; | ||
|
|
||
| public interface TaskManager { | ||
|
|
||
| Task addTask(Task task); | ||
|
|
||
| Epic addEpic(Epic epic); | ||
|
|
||
| Subtask addSubtask(Subtask subtask); | ||
|
|
||
| Task updateTask(Task task); | ||
|
|
||
| Epic updateEpic(Epic epic); | ||
|
|
||
| Subtask updateSubtask(Subtask subtask); | ||
|
|
||
| Task getTaskByID(int id); | ||
|
|
||
| Epic getEpicByID(int id); | ||
|
|
||
| Subtask getSubtaskByID(int id); | ||
|
|
||
| ArrayList<Task> getTasks(); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ArrayList Вообще в качестве типов, возвращаемых из методов, не стоит использовать типы конкретных реализаций, лучше использовать более высокие абстракции, List<..>, Map<..> или даже Collection<..> Детали реализации лучше скрывать :) |
||
|
|
||
| ArrayList<Epic> getEpics(); | ||
|
|
||
| ArrayList<Subtask> getSubtasks(); | ||
|
|
||
| ArrayList<Subtask> getEpicSubtasks(Epic epic); | ||
|
|
||
| void deleteTasks(); | ||
|
|
||
| void deleteEpics(); | ||
|
|
||
| void deleteSubtasks(); | ||
|
|
||
| void deleteTaskByID(int id); | ||
|
|
||
| void deleteEpicByID(int id); | ||
|
|
||
| void deleteSubtaskByID(int id); | ||
|
|
||
| List<Task> getHistory(); | ||
|
|
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Это класс можно было и не создавать, а его методы реализовать как приватные методы менеджера истории.
Необязательно, на Ваше усмотрение.