Package managers

Class FileReaderManager

java.lang.Object
managers.FileReaderManager

public class FileReaderManager extends Object
The FileReaderManager class is responsible for managing the FileReader functionality in the Pacman project. It provides a single point of access for obtaining the FileReader instance and the ConfigFileReader instance. The FileReaderManager ensures that only one instance of ConfigFileReader is created and reused throughout the system.
  • Method Details

    • getInstance

      public static FileReaderManager getInstance()
      Get one instance of FileReaderManager in whole system. Will be used to globally access that one instance.
      Returns:
      FileReaderManager Instance of FileReaderManager that is in use
    • getConfigReader

      public ConfigFileReader getConfigReader()
      Get the one ConfigReader in whole system If there is not a ConFigFileReader created yet, make a new one. Otherwise, use the one we have. This allows us to not make many instances of ConfigFileReader.
      Returns:
      ConfigFileReader The one instance of this class that is used in the system.