what is the best type to store data from csv format file, where is 150k records(lines) where each line has 9 columns(fields). After initialize my type with these data i need to do some operations on it, like add record in specified line, or add/change some data in some field. Also i need to compare data between themselves. Thank for help!
什么是从csv格式文件存储数据的最佳类型,其中150k记录(行),其中每行有9列(字段)。在使用这些数据初始化我的类型后,我需要对它进行一些操作,比如在指定行中添加记录,或者在某些字段中添加/更改某些数据。我还需要比较他们自己之间的数据。谢谢你的帮助!
3
The best type to use is an ArrayList of a domain object. The domain object has 9 properties.
要使用的最佳类型是域对象的ArrayList。域对象有9个属性。
In other words: don't make it generic, make it specific for your problem. Then your code will be more readable and type-safety helps you when you create the functionality.
换句话说:不要使它成为通用的,使其具体针对您的问题。然后,您的代码将更具可读性,并且在您创建功能时类型安全可以帮助您。
本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.silva-art.net/blog/2015/09/18/5e56750985f7a13867ed5b79bae6eb51.html。