I started working on an investing project in java and I need a good data-structure to meet its requirements. I've seen some solutions here to a bit similar questions, but with different requirements.
My requirements are as follow:
map<String Symbol, Company company>
If you really want to use Java classes only, using two Maps is the best option here. While it does need two operations to store a single new company, you will probably read data way more often than you store it. And as long as it's stored as references the additional space required by a second Map is negligible.
However, in the unlikely case that there is a deteministic way to create a company's symbol out of it's name or vice versa, it would be possible to create a hash function which calculates identical hashes for a company's symbol and name. In that case a HashTable/HashMap would be slighlty more efficient.
Since you already save your data to a file, which is a kind of persistent storage, I recommend using a database. The sole purpose of a DBMS is to store, manage and query large amounts of data efficiently making them the best option in most situations. And with Java's SQL libraries
java.sql.* it's really easy to integrate as well.