Package src.model

Class Cineplex

Object
Cineplex
All Implemented Interfaces:
Serializable, Comparable

public class Cineplex extends Object implements Comparable, Serializable
The Class that handles the data of Cineplex
Version:
1.0
Author:
Lee Juin
See Also:
  • 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 database
      cineplexName - is the name of the cinplex
      numOfCinemas - is the total number of cinemas in the cineplex
      cinemas - is all the Cinema instances in the cineplex
      cineplexLocation - is the location of the cineplex
  • Method Details

    • getUUID

      public String getUUID()
      Gets the unique ID of the cineplex
      Returns:
      The unique ID of the cineplex
    • setUUID

      public void setUUID(String UUID)
      Sets the unique ID of the cineplex
      Parameters:
      UUID - is the unique ID of the cineplex
    • getCineplexName

      public String getCineplexName()
      Gets the name of the cineplex
      Returns:
      The name of the cineplex
    • setCineplexName

      public void setCineplexName(String cineplexName)
      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

      public ArrayList<Cinema> getCinemas()
      Gets all the Cinema instances in the cineplex
      Returns:
      ArrayList of Cinema instances in the cineplex
    • setCinemas

      public void setCinemas(ArrayList<Cinema> cinemas)
      Sets all the Cinema instances in the cineplex
      Parameters:
      cinemas - is the Cinema instances to be set
    • addCinema

      public void addCinema(Cinema cinema)
      Method to add a cinema into the cineplex
      Parameters:
      cinema - is the cinema to be added
    • compareTo

      public int compareTo(Object object)
      Method to compare between cineplexes, sorted by UUID
      Specified by:
      compareTo in interface Comparable
      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

      public String getCineplexLocation()
      Gets the location of the cineplex
      Returns:
      The location of the cineplex
    • setCineplexLocation

      public void setCineplexLocation(String cineplexLocation)
      Sets the location of the cineplex
      Parameters:
      cineplexLocation - is the location of the cineplex