forked from cuongquangnam/CZ2002-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Seat.java
44 lines (42 loc) · 1.1 KB
/
Seat.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
package models;
import java.util.*;
enum Type{
COUPLE,ELITE, ULTIMA, NORMAL
}
public class Seat {
private Cinema cinema;
private Type type;
private Seat accompanied;
private Map<MovieShowing, Boolean> selected;
public Seat(Cinema cinema, Type type, Seat accompanied) {
this.cinema = cinema;
this.type = type;
this.accompanied = accompanied;
this.selected = new HashMap<MovieShowing,Boolean>();
}
public Type getType() {
return type;
}
public void setType(Type type, Seat accompanied) {
this.type = type;
this.accompanied = accompanied;
}
public void setAccompanied(Seat accompanied) {
this.accompanied = accompanied;
}
public Seat getAccompanied() {
return accompanied;
}
public Cinema getCinema(Cinema cinema) {
return cinema;
}
public void addShowTime(MovieShowing show, boolean bool) {
this.addShowTime(show,Boolean.valueOf(bool));
}
public boolean getSelected(MovieShowing time) {
return selected.get(time).booleanValue();
}
public void setSelected(MovieShowing time,boolean s ) {
selected.put(time, Boolean.valueOf(s));
}
}