Store Table in Java Object - Datastructure -
i have store data structured table in java. besides columnnames , data store different metadata data type of column. @ moment i'm using object.
public class data { private final map<string, list<object>> values; private final map<string, integer> columnspec; private int rowsize; //getter , setter
as can see save data columnoriented. have itterate on data in specific column. on specific rows. i'm looking structre can switch column row layout (or vice versa).
which object suggest? how can reach maximum performance (less iteration change layout)? table can have on 1 million lines in cases.
if using library not problem, can use guava table structures. of avaliable structures are: treebasedtable, hashbasedtable, immutabletable , arraytable. can pick suitable one.
Comments
Post a Comment