I have to store data structured as a table in JAVA. Besides the columnnames and data i store different metadata like the data type of the column. At the moment I'm using this object.
public class Data {
private final Map<String, List<Object>> values;
private final Map<String, Integer> columnSpec;
private int rowSize;
//Getter and Setter
As you can see I save the data columnoriented. Sometimes I have to itterate over data in specific column. Sometimes over specific rows. I'm looking for a structre where i can easily switch from column to row layout (or vice versa).
Which object do you suggest? How can i reach the maximum performance (less iteration to change layout)? The table can have over 1 Million lines in some cases.