dev #36

Manually merged
KamaSK merged 20 commits from dev into main 2025-05-29 22:23:05 +03:00
4 changed files with 14 additions and 0 deletions
Showing only changes of commit 644709a3f0 - Show all commits

View File

@ -10,6 +10,10 @@ public class TodoApp {
public static void main(String[] args) throws IOException {
var service = new TaskService(new InMemoryTaskRepository());
var cli = new CliEngine(service);
// service.create("test has-id");
// System.out.println(service.has(2));
cli.start();
}

View File

@ -30,4 +30,8 @@ public class InMemoryTaskRepository implements TaskRepository {
public void delete(int id) {
storage.remove(id);
}
public boolean has(int id) {
return storage.containsKey(id);
}
}

View File

@ -13,4 +13,6 @@ public interface TaskRepository {
List<Task> findAll();
void delete(int id);
boolean has(int id);
}

View File

@ -38,4 +38,8 @@ public class TaskService {
public void remove(int id) {
repo.delete(id);
}
public boolean has(int id) {
return repo.has(id);
}
}