merge with recyclerview
This commit is contained in:
@@ -1,23 +1,31 @@
|
||||
package com.a1.nextlocation.recyclerview;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.a1.nextlocation.data.Coupon;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class CouponListManager {
|
||||
|
||||
private List<Coupon> coupon;
|
||||
|
||||
public CouponListManager(){
|
||||
private List<Coupon> couponList;
|
||||
private Context context;
|
||||
|
||||
public CouponListManager(Context context){
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public List<Coupon> getCoupon() {
|
||||
return coupon;
|
||||
public List<Coupon> getCouponList() {
|
||||
return couponList;
|
||||
}
|
||||
|
||||
public void setCoupon(List<Coupon> location) {
|
||||
this.coupon = coupon;
|
||||
public Coupon getCoupon(int place) {
|
||||
return couponList.get(place);
|
||||
}
|
||||
|
||||
public void load(){
|
||||
CouponLoader couponLoader = new CouponLoader(this.context);
|
||||
this.couponList = couponLoader.load();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,22 +1,31 @@
|
||||
package com.a1.nextlocation.recyclerview;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.a1.nextlocation.data.Location;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class LocationListManager {
|
||||
|
||||
private List<Location> location;
|
||||
private List<Location> locationList;
|
||||
private Context context;
|
||||
|
||||
public LocationListManager(){
|
||||
public LocationListManager(Context context){
|
||||
this.context = context;
|
||||
|
||||
}
|
||||
|
||||
public List<Location> getLocation() {
|
||||
return location;
|
||||
public List<Location> getLocationList() {
|
||||
return locationList;
|
||||
}
|
||||
|
||||
public void setLocation(List<Location> location) {
|
||||
this.location = location;
|
||||
public Location getLocation(int place) {
|
||||
return locationList.get(place);
|
||||
}
|
||||
|
||||
public void load() {
|
||||
LocationLoader locationLoader = new LocationLoader(this.context);
|
||||
this.locationList = locationLoader.load();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,30 @@
|
||||
package com.a1.nextlocation.recyclerview;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.a1.nextlocation.data.Route;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class RouteListManager {
|
||||
public class RouteListManager{
|
||||
|
||||
List<Route> routes;
|
||||
|
||||
public RouteListManager(){
|
||||
private List<Route> routeList;
|
||||
private Context context;
|
||||
|
||||
public RouteListManager(Context context){
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public List<Route> getRoutes() {
|
||||
return routes;
|
||||
public List<Route> getRouteList() {
|
||||
return routeList;
|
||||
}
|
||||
|
||||
public void setRoutes(List<Route> routes) {
|
||||
this.routes = routes;
|
||||
public Route getRoute(int place) {
|
||||
return routeList.get(place);
|
||||
}
|
||||
|
||||
public void load() {
|
||||
RouteLoader routeLoader = new RouteLoader(this.context);
|
||||
this.routeList = routeLoader.load();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user