java - HashMap implementation of DataSource interface : nextRow() method? -
I would like to apply a DataSource
interface (in Java), which, among other things, To get nextRow ()
from the data, I want to initially implement the data store through the Hashmaps, but it will be different from the underlying data structure, and will provide an interface as mentioned has been done.
Is this sound a good idea? Implementation of next line ()
implementation hashmap
seems a bit messy - I think it is necessary to provide an Iterator on the collection view of the data. And I think I'll also need to provide the resetIterator
method?
To provide more details:
- I'm thinking
newRow ()
methodhashmap
- Implementation of
Hashmap
data storeHashmap
Any thoughts or comments are highly appreciated!
Interfaces, through ITR, and revealing methods. You can use any of these behind the scenes to do what's in your mind.
On one side note that a hashmap for every data line is too overhead. If you can already fix a set of columns, then to represent each line, the list (probably Arrielist) or even just a simple array will be very cheap to use.
Comments
Post a Comment