I am doing a University assignment about developing a Dataframe library (we are supposed to import the data from files such as csv, json and txt). The data structure I chose is HashMap<String, ArrayList<Object>> where the key represents a column label and the value (List) is the column values storage. When the program reads a file the first row goes through a filter which determines which kind of Object it is (Integer, String...) in order to add the data in that way (list.add(new Integer(2)) for example) but I'm not sure if it is the best way to proceed because the program is supposed to make some operations as well such as sort values (comparator), query (predicate)... Take into account every column can contain a different data type.
I also thought about using ArrayList<String> instead and transforming the values when necessary but would not be too optimal and I prefer asking you first.
Thanks a lot in advance.
Example:
LatD LatM LatS NS LonD LonM LonS EW City State
41 5 59 N 80 39 0 W Youngstown OH
Assignment document: https://drive.google.com/file/d/1Saqiw23vQk7Yoh2csmuH2adcktNzDmjP/view?usp=sharing