I'm having trouble wrapping my head around the both of these.
I'm trying to read in a reference table into a somewhat dynamic structure(not an array). The table has mainly 3 types, string/int/double. I tried originally using an ArrayList to read the table, which at the moment has around 60 rows, 12 columns, but it slowed my processing time dramatically. I've read that this is due to the boxing/unboxing, and that makes sense. I should note that I built an ArrayList of ArrayLists, maybe there is a better way to do it?
My question is, what's my best option for a data structure here? Lists seem to need one strong type, which won't work for me. I'm trying to convert from a two-dimensional array to something where I don't need to define bounds, and I'm a little lost. It also needs to be as fast as possible. If someone could point me in the right direction, that would be much appreciated.
Erik
I'm trying to read in a reference table into a somewhat dynamic structure(not an array). The table has mainly 3 types, string/int/double. I tried originally using an ArrayList to read the table, which at the moment has around 60 rows, 12 columns, but it slowed my processing time dramatically. I've read that this is due to the boxing/unboxing, and that makes sense. I should note that I built an ArrayList of ArrayLists, maybe there is a better way to do it?
My question is, what's my best option for a data structure here? Lists seem to need one strong type, which won't work for me. I'm trying to convert from a two-dimensional array to something where I don't need to define bounds, and I'm a little lost. It also needs to be as fast as possible. If someone could point me in the right direction, that would be much appreciated.
Erik