public class Currency implements Parcelable SerializedName private Str

 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
public class Currency implements Parcelable {
@SerializedName("A")
private String a;
@SerializedName("B")
private String b;
@SerializedName("EXCHANGERATE")
private double exchangeRate;
// Getters, Setters, ...
// Implementing Parcelable
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(a);
dest.writeString(b);
dest.writeDouble(exchangeRate);
}
public static final Parcelable.Creator<Currency> CREATOR = new Parcelable.Creator<Currency>() {
@Override
public Currency createFromParcel(Parcel source) {
return new Currency(source);
}
@Override
public Currency[] newArray(int size) {
return new Currency[size];
}
};
private Currency(Parcel parcel) {
a = parcel.readString();
b = parcel.readString();
exchangeRate = parcel.readDouble();
}
}