-
Notifications
You must be signed in to change notification settings - Fork 0
/
Faculty.java
48 lines (38 loc) · 1.03 KB
/
Faculty.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
package ua.elitasoftware.UzhNU;
import android.os.Parcel;
import android.os.Parcelable;
public class Faculty implements Parcelable {
public static Creator<Faculty> CREATOR = new Creator<Faculty>() {
public Faculty createFromParcel(Parcel source) {
return new Faculty(source);
}
public Faculty[] newArray(int size) {
return new Faculty[size];
}
};
private Integer id;
private String name;
public Faculty(Integer id, String name) {
this.id = id;
this.name = name;
}
private Faculty(Parcel in) {
this.id = (Integer) in.readValue(Integer.class.getClassLoader());
this.name = in.readString();
}
public Integer getId() {
return id;
}
public String getName() {
return name;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeValue(this.id);
dest.writeString(this.name);
}
}