I’m creating a client side cache object and one of the consumers of the cache needs a means of looking up data by type. Obviously I can’t just have a map from class to data since that wouldn’t retrieve subtypes of the class. Is there a ‘standard’ or well suited data structure for this kind of thing?
Share
Instead of using a HashTable, it’d be easier to use a tree, since a tree would easily represent the type heirarchy.