Package net.maswag.falcaun
Class AbstractMapperReader
java.lang.Object
net.maswag.falcaun.AbstractMapperReader
- Direct Known Subclasses:
InputMapperReader,OutputMapperReader
Abstract class for reading and parsing mapper data from files.
This class provides utility methods to read raw data from a file, parse it into lists of doubles,
and assign characters to the parsed data based on a provided character list.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassignCharacters(List<List<Double>> parsedData, char[] charList) Assigns characters to the parsed data based on a provided character list.Parses raw data from a file into a list of lists of doubles.
-
Constructor Details
-
AbstractMapperReader
AbstractMapperReader()Default constructor for AbstractMapperReader. This class only provides static utility methods, so no initialization is needed.
-
-
Method Details
-
rawParse
Parses raw data from a file into a list of lists of doubles.- Parameters:
filename- The name of the file to read and parse.- Returns:
- A list of lists of doubles, where each inner list represents a line of parsed data.
- Throws:
IOException- If an I/O error occurs while reading the file.
-
assignCharacters
public static ArrayList<Map<Character,Double>> assignCharacters(List<List<Double>> parsedData, char[] charList) Assigns characters to the parsed data based on a provided character list.- Parameters:
parsedData- A list of lists of doubles, where each inner list represents a line of parsed data.charList- An array of characters to assign to the parsed data.- Returns:
- An ArrayList of maps, where each map assigns characters to the corresponding values in the parsed data.
-