diff --git a/app/src/main/java/com/a1/nextlocation/recyclerview/CouponListManager.java b/app/src/main/java/com/a1/nextlocation/recyclerview/CouponListManager.java index eba6b40..5bef09f 100644 --- a/app/src/main/java/com/a1/nextlocation/recyclerview/CouponListManager.java +++ b/app/src/main/java/com/a1/nextlocation/recyclerview/CouponListManager.java @@ -23,7 +23,7 @@ public enum CouponListManager { } /** - * Prepares the list for loading + * prepares the list for the adapter */ public void load(){ CouponLoader couponLoader = new CouponLoader(this.context); diff --git a/app/src/main/java/com/a1/nextlocation/recyclerview/LocationListManager.java b/app/src/main/java/com/a1/nextlocation/recyclerview/LocationListManager.java index 84e2eb9..32e2a67 100644 --- a/app/src/main/java/com/a1/nextlocation/recyclerview/LocationListManager.java +++ b/app/src/main/java/com/a1/nextlocation/recyclerview/LocationListManager.java @@ -24,10 +24,9 @@ public enum LocationListManager { return locationList; } - public Location getLocation(int place) { - return locationList.get(place); - } - + /** + * prepares the array list for the adapter + */ public void load() { LocationLoader locationLoader = new LocationLoader(this.context); this.locationList = locationLoader.load(); diff --git a/app/src/main/java/com/a1/nextlocation/recyclerview/LocationLoader.java b/app/src/main/java/com/a1/nextlocation/recyclerview/LocationLoader.java index 313c151..ae17206 100644 --- a/app/src/main/java/com/a1/nextlocation/recyclerview/LocationLoader.java +++ b/app/src/main/java/com/a1/nextlocation/recyclerview/LocationLoader.java @@ -17,6 +17,10 @@ public class LocationLoader implements Loader> { this.context = context; } + /** + * loads the array list from a JSON file + * @return array list with locations + */ @Override public ArrayList load() { FileIO> fileIO = new FileIO<>(); diff --git a/app/src/main/java/com/a1/nextlocation/recyclerview/RouteAdapter.java b/app/src/main/java/com/a1/nextlocation/recyclerview/RouteAdapter.java index dffb982..1c5ea9a 100644 --- a/app/src/main/java/com/a1/nextlocation/recyclerview/RouteAdapter.java +++ b/app/src/main/java/com/a1/nextlocation/recyclerview/RouteAdapter.java @@ -41,6 +41,10 @@ public class RouteAdapter extends RecyclerView.Adapter(); } - public List getRouteList() { return routeList; } - public Route getRoute(int place) { - return routeList.get(place); - } - + /** + * prepares the array list for the adapter + */ public void load() { RouteLoader routeLoader = new RouteLoader(this.context); this.routeList = routeLoader.load(); diff --git a/app/src/main/java/com/a1/nextlocation/recyclerview/RouteLoader.java b/app/src/main/java/com/a1/nextlocation/recyclerview/RouteLoader.java index df65664..0317961 100644 --- a/app/src/main/java/com/a1/nextlocation/recyclerview/RouteLoader.java +++ b/app/src/main/java/com/a1/nextlocation/recyclerview/RouteLoader.java @@ -18,6 +18,10 @@ public class RouteLoader implements Loader> { this.context = context; } + /** + * loads an array list from a JSON + * @return an array list with routes + */ @Override public ArrayList load() {