Package moblima.control.handlers
Class ShowtimeHandler
java.lang.Object
moblima.control.handlers.ShowtimeHandler
- Direct Known Subclasses:
CinemaHandler
The type Showtime handler.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
The Selected showtime idx.The Showtimes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean[][]
assignSeat
(boolean[][] seats, int[] seatCode, boolean availabilityAssignment) Assign seat boolean [ ] [ ].boolean
assignSeat
(int showtimeIdx, int[] seatCode, boolean availabilityAssignment) Assign seat boolean.boolean
bulkAssignSeat
(int showtimeIdx, List<int[]> seatCodes, boolean availabilityAssignment) Bulk assign seat boolean.int
getAvailableSeatCount
(int showtimeIdx) Gets available seat count.getShowtime
(int showtimeIdx) Gets showtime.getShowtime
(String showtimeId) Gets showtime.int
getShowtimeIdx
(String showtimeId) Gets showtime idx.getShowtimes
(int movieId) Gets showtimes.void
printSeats
(boolean[][] seats, List<int[]> selectedSeats) Print seats.void
printSeats
(int showtimeIdx) Print seats.printShowtimeDetails
(int showtimeIdx) Print showtime details.boolean
removeShowtime
(String showtimeId) Remove showtime boolean.protected boolean
Save showtimes boolean.void
setSelectedShowtimeIdx
(int showtimeIdx) Sets selected showtime idx.boolean
updateShowtimeSeats
(int showtimeIdx, boolean[][] seats) Update showtime seats boolean.
-
Field Details
-
showtimes
The Showtimes. -
selectedShowtimeIdx
protected int selectedShowtimeIdxThe Selected showtime idx.
-
-
Constructor Details
-
ShowtimeHandler
public ShowtimeHandler()
-
-
Method Details
-
setSelectedShowtimeIdx
public void setSelectedShowtimeIdx(int showtimeIdx) Sets selected showtime idx.- Parameters:
showtimeIdx
- the showtime idx
-
getShowtimeIdx
Gets showtime idx.- Parameters:
showtimeId
- the showtime id- Returns:
- the showtime idx
-
getShowtime
Gets showtime.- Parameters:
showtimeIdx
- the showtime idx- Returns:
- the showtime
-
getShowtime
Gets showtime.- Parameters:
showtimeId
- the showtime id- Returns:
- the showtime
-
getShowtimes
Gets showtimes.- Parameters:
movieId
- the movie id- Returns:
- the showtimes
-
updateShowtimeSeats
public boolean updateShowtimeSeats(int showtimeIdx, boolean[][] seats) Update showtime seats boolean.- Parameters:
showtimeIdx
- the showtime idxseats
- the seats- Returns:
- the boolean
-
removeShowtime
Remove showtime boolean.- Parameters:
showtimeId
- the showtime id- Returns:
- the boolean
-
printShowtimeDetails
Print showtime details.- Parameters:
showtimeIdx
- the showtime idx- Returns:
- the string
-
printSeats
public void printSeats(int showtimeIdx) Print seats.- Parameters:
showtimeIdx
- the showtime idx
-
printSeats
Print seats.- Parameters:
seats
- the seatsselectedSeats
- the selected
-
bulkAssignSeat
public boolean bulkAssignSeat(int showtimeIdx, List<int[]> seatCodes, boolean availabilityAssignment) Bulk assign seat boolean.- Parameters:
showtimeIdx
- the showtime idxseatCodes
- the seat codesavailabilityAssignment
- the availability assignment- Returns:
- the boolean
-
assignSeat
public boolean assignSeat(int showtimeIdx, int[] seatCode, boolean availabilityAssignment) Assign seat boolean.- Parameters:
showtimeIdx
- the showtime idxseatCode
- the seat codeavailabilityAssignment
- the availability assignment- Returns:
- the boolean
-
assignSeat
public boolean[][] assignSeat(boolean[][] seats, int[] seatCode, boolean availabilityAssignment) Assign seat boolean [ ] [ ].- Parameters:
seats
- the seatsseatCode
- the seat codeavailabilityAssignment
- the availability assignment- Returns:
- the boolean [ ] [ ]
-
getAvailableSeatCount
public int getAvailableSeatCount(int showtimeIdx) Gets available seat count.- Parameters:
showtimeIdx
- the showtime idx- Returns:
- the available seat count
-
saveShowtimes
protected boolean saveShowtimes()Save showtimes boolean.- Returns:
- the boolean
-