Package managers
Class FileReaderManager
java.lang.Object
managers.FileReaderManager
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 Summary
Modifier and TypeMethodDescriptionGet the one ConfigReader in whole system If there is not a ConFigFileReader created yet, make a new one.static FileReaderManagerGet one instance of FileReaderManager in whole system.
-
Method Details
-
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
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.
-