Class MessageLoader
Object
MessageLoader
This utility class contains methods that will read in a file as it is provided, and load the data into
an ArrayList with
OpenMessage objects inside of it.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ArrayList<OpenMessage>This method reads through a file, and builds a number of Message objects based on the contents of that file.static StringTakes in a line, in which one must grab the substring *after* the ":".
-
Constructor Details
-
MessageLoader
public MessageLoader()
-
-
Method Details
-
loadFile
This method reads through a file, and builds a number of Message objects based on the contents of that file. It then returns an ArrayList for each Message. Implemented in Lab 10.- Parameters:
filename- Name of file to be opened.- Returns:
- An ArrayList with 0 or more messages.
-
parseLine
Takes in a line, in which one must grab the substring *after* the ":". It will also remove any leading and trailing spaces. Implemented in Lab 10.- Parameters:
line- Line to parse- Returns:
- parsed line
-