Compare commits
No commits in common. "644709a3f0e1543763e90c9e8fecaffeac9fe699" and "782325ecc8c498a051d847a74574101dde78bb7f" have entirely different histories.
644709a3f0
...
782325ecc8
@ -10,10 +10,6 @@ public class TodoApp {
|
|||||||
public static void main(String[] args) throws IOException {
|
public static void main(String[] args) throws IOException {
|
||||||
var service = new TaskService(new InMemoryTaskRepository());
|
var service = new TaskService(new InMemoryTaskRepository());
|
||||||
var cli = new CliEngine(service);
|
var cli = new CliEngine(service);
|
||||||
|
|
||||||
// service.create("test has-id");
|
|
||||||
// System.out.println(service.has(2));
|
|
||||||
|
|
||||||
cli.start();
|
cli.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -30,8 +30,4 @@ public class InMemoryTaskRepository implements TaskRepository {
|
|||||||
public void delete(int id) {
|
public void delete(int id) {
|
||||||
storage.remove(id);
|
storage.remove(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean has(int id) {
|
|
||||||
return storage.containsKey(id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,4 @@ public interface TaskRepository {
|
|||||||
List<Task> findAll();
|
List<Task> findAll();
|
||||||
|
|
||||||
void delete(int id);
|
void delete(int id);
|
||||||
|
|
||||||
boolean has(int id);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,8 +38,4 @@ public class TaskService {
|
|||||||
public void remove(int id) {
|
public void remove(int id) {
|
||||||
repo.delete(id);
|
repo.delete(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean has(int id) {
|
|
||||||
return repo.has(id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user