From 641bb55b7247f7ce32b488a72cf350ef789fd22d Mon Sep 17 00:00:00 2001 From: BGbaderguet <48762010+BGbaderguet@users.noreply.github.com> Date: Mon, 9 Nov 2020 19:57:43 +0100 Subject: [PATCH] Interface that contains the declaration of our methods --- .../vj/apps/myweather/ICityService.java | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 app/src/main/java/fr/romanet/vj/apps/myweather/ICityService.java diff --git a/app/src/main/java/fr/romanet/vj/apps/myweather/ICityService.java b/app/src/main/java/fr/romanet/vj/apps/myweather/ICityService.java new file mode 100644 index 0000000..5fa52d2 --- /dev/null +++ b/app/src/main/java/fr/romanet/vj/apps/myweather/ICityService.java @@ -0,0 +1,32 @@ +package fr.romanet.vj.apps.myweather; + +import java.util.List; +import fr.romanet.vj.apps.myweather.bo.City; + +//Interface used in order to implement correctly the repository pattern +public interface ICityService +{ + /** + * Get all the city + * @return {@link List} + */ + List getCity(); + + /** + * Deletes a city + * @param cityToDelete + */ + void deleteCity(City cityToDelete); + + /** + * Add a city + * @param cityToAdd + */ + void addCity(City cityToAdd); + + /** + * Get all cities sorted by name + * @return {@link List} + */ + List sortCityByName(); +} \ No newline at end of file