commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "JP Beaudry" <>
Subject multi-key/multi index collection
Date Fri, 10 Dec 2004 01:53:56 GMT
Hi all,
I'm hoping you can provide me with some advice on how best to accomplish the
following. Perhaps there is already a well-known library or design pattern
I'm not familiar with.
I'd like to store objects in a collection of some sort where I can retrieve
them by their key AND have the ability to retrieve the subset of those
objects that share a common value for a given attribute. For example, if the
car class has id, color, make, model for attributes, I'd like to be able to
retrieve a specific instance by its id (which is unique and can be used as
key). I'd also like to (quickly as in cpu time) retrieve the subset of white
cars. I am willing to move to use a typed collection to insure attribute
uniformity. I am more concern with performance than memory usage.
Thanks for any idea or insight,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message