Package src.model
Class Cineplex
Object
Cineplex
- All Implemented Interfaces:
Serializable
,Comparable
The Class that handles the data of Cineplex
- Version:
- 1.0
- Author:
- Lee Juin
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Method to add a cinema into the cineplexint
Method to compare between cineplexes, sorted by UUIDGets all theCinema
instances in the cineplexGets the location of the cineplexGets the name of the cineplexint
Gets the total number of cinemas in the cineplexgetUUID()
Gets the unique ID of the cineplexvoid
setCinemas
(ArrayList<Cinema> cinemas) Sets all theCinema
instances in the cineplexvoid
setCineplexLocation
(String cineplexLocation) Sets the location of the cineplexvoid
setCineplexName
(String cineplexName) Sets the name of the cineplexvoid
setNumOfCinemas
(int numOfCinemas) Sets the total number of cinemas in the cineplexvoid
Sets the unique ID of the cineplex
-
Constructor Details
-
Cineplex
public Cineplex(String UUID, String cineplexName, int numOfCinemas, ArrayList<Cinema> cinemas, String cineplexLocation) Constructor for Cineplex class- Parameters:
UUID
- is the unique ID in the databasecineplexName
- is the name of the cinplexnumOfCinemas
- is the total number of cinemas in the cineplexcinemas
- is all theCinema
instances in the cineplexcineplexLocation
- is the location of the cineplex
-
-
Method Details
-
getUUID
Gets the unique ID of the cineplex- Returns:
- The unique ID of the cineplex
-
setUUID
Sets the unique ID of the cineplex- Parameters:
UUID
- is the unique ID of the cineplex
-
getCineplexName
Gets the name of the cineplex- Returns:
- The name of the cineplex
-
setCineplexName
Sets the name of the cineplex- Parameters:
cineplexName
- is the name of the cineplex
-
getNumOfCinemas
public int getNumOfCinemas()Gets the total number of cinemas in the cineplex- Returns:
- The total number of cinemas in the cineplex
-
setNumOfCinemas
public void setNumOfCinemas(int numOfCinemas) Sets the total number of cinemas in the cineplex- Parameters:
numOfCinemas
- is the total number of cinemas in the cineplex
-
getCinemas
Gets all theCinema
instances in the cineplex- Returns:
- ArrayList of
Cinema
instances in the cineplex
-
setCinemas
Sets all theCinema
instances in the cineplex- Parameters:
cinemas
- is theCinema
instances to be set
-
addCinema
Method to add a cinema into the cineplex- Parameters:
cinema
- is the cinema to be added
-
compareTo
Method to compare between cineplexes, sorted by UUID- Specified by:
compareTo
in interfaceComparable
- Parameters:
object
- is the cineplex to be compared to- Returns:
- More than zero if object is lower priority, equal to zero if equal priority, less than zero if object is higher priority
-
getCineplexLocation
Gets the location of the cineplex- Returns:
- The location of the cineplex
-
setCineplexLocation
Sets the location of the cineplex- Parameters:
cineplexLocation
- is the location of the cineplex
-