]> matita.cs.unibo.it Git - logicplayer.git/blob - mainActivity/src/com/example/furt/myapplication/ServerData.java
2466f27e8798967de6cad4a086930a21e150f11d
[logicplayer.git] / mainActivity / src / com / example / furt / myapplication / ServerData.java
1 package com.example.furt.myapplication;
2
3 import android.os.Parcel;
4 import android.os.Parcelable;
5
6 import java.util.ArrayList;
7 import java.util.List;
8
9 // simple class that just has one member property as an example
10 public class ServerData implements Parcelable {
11     private static List<String> L;
12
13     ServerData(List<String> List)
14     {
15         L=List;
16     }
17     /* everything below here is for implementing Parcelable */
18
19     // 99.9% of the time you can just ignore this
20     public int describeContents() {
21         return 0;
22     }
23
24     // write your object's data to the passed-in Parcel
25     public void writeToParcel(Parcel out, int flags) {
26         out.writeList(L);
27     }
28
29     // this is used to regenerate your object. All Parcelables must have a CREATOR that implements these two methods
30     public static final Creator<ServerData> CREATOR = new Creator<ServerData>() {
31         public ServerData createFromParcel(Parcel in) {
32             return new ServerData(L);
33         }
34
35         public ServerData[] newArray(int size) {
36             return new ServerData[size];
37         }
38     };
39
40 }