array and map in one
1 posts in topic
Flat View  Flat View

Posted By:   Slim_Shaddy
Posted On:   Monday, February 11, 2002 02:51 PM

Is there some class that supports and getting element by number and by key.

Re: array and map in one

Posted By:   Chandra_Patni  
Posted On:   Tuesday, February 19, 2002 01:47 AM

If you think carefully, your question make sense in certain scenario where a lookup may occur with a key and an index. While its common, I havn't seen any data structure which does it.

You can certainly write a collection which is the composition of ArrayList and a HashMap which effectively solves the problem.

About | Sitemap | Contact