This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
Joined: Aug 20, 2008
I had originally not gone that route because I didn't want to just duplicate a Map with a predefined list of keys, which is all the Record class would be in this instance. I probably should do it though, as a matter of good OO practice.
A Map of Lists would be a bad idea because it separates all the values that obviously belong together. It would be a lot harder to find all values for one record. Besides, there is no guarantee that the Lists all have the same length - it's up to you to ensure that. A List of Maps does not have that problem but it does allow for the absence of values for one record. I don't know if that is allowed or not.
I agree with Garrett that a List of Record would be best.