-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMenuInfo.java
62 lines (49 loc) · 1.32 KB
/
MenuInfo.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package com.deange.uwaterlooapi.model.foodservices;
import android.os.Parcel;
import android.os.Parcelable;
import com.deange.uwaterlooapi.model.BaseModel;
import com.deange.uwaterlooapi.model.common.DateRange;
import com.google.gson.annotations.SerializedName;
import java.util.List;
public class MenuInfo
extends BaseModel
implements
Parcelable {
@SerializedName("date")
DateRange mDateRange;
@SerializedName("outlets")
List<Outlet> mOutlets;
protected MenuInfo(final Parcel in) {
super(in);
mDateRange = in.readParcelable(DateRange.class.getClassLoader());
mOutlets = in.createTypedArrayList(Outlet.CREATOR);
}
@Override
public void writeToParcel(final Parcel dest, final int flags) {
super.writeToParcel(dest, flags);
dest.writeParcelable(mDateRange, flags);
dest.writeTypedList(mOutlets);
}
public static final Creator<MenuInfo> CREATOR = new Creator<MenuInfo>() {
@Override
public MenuInfo createFromParcel(final Parcel in) {
return new MenuInfo(in);
}
@Override
public MenuInfo[] newArray(final int size) {
return new MenuInfo[size];
}
};
/**
* Menu date object
*/
public DateRange getDateRange() {
return mDateRange;
}
/**
* Available outlets
*/
public List<Outlet> getOutlets() {
return mOutlets;
}
}