R
Raj
Hi all,
I have a requirement to be able to search a huge list of java objects
(constructed from a database resultset) given the value of certain
member variables. I could achieve the same by having n separate
HashMaps, one for each variable member I want to include in the
search, with the hashmap key being the member value and the hashmap
value being the object itself. Is there a better data structure I can
use? Any better way to do this? Would a treemap be more efficient for
searching than a HashMap? If this were in the database, an index could
be used. What would be the java equivalent?
Thanks in advance
Greetings
-Raj
I have a requirement to be able to search a huge list of java objects
(constructed from a database resultset) given the value of certain
member variables. I could achieve the same by having n separate
HashMaps, one for each variable member I want to include in the
search, with the hashmap key being the member value and the hashmap
value being the object itself. Is there a better data structure I can
use? Any better way to do this? Would a treemap be more efficient for
searching than a HashMap? If this were in the database, an index could
be used. What would be the java equivalent?
Thanks in advance
Greetings
-Raj