Let suppose that i have a hashmap like this
Map map = new HashMap();
map.put(key, p.getText());
and then to get a value i should do this:
map.get("key_value");
is there a way to get the value like this:
map.key_value;
to speed up my application?
You might be able to whip something up with the values
Collection? You can get a more primitive representation of you objects, but you’re still working with theHashMap, etc.But I doubt it will help you speed up your application, as it sounds like a micro-improvement that won’t help too much.
Anyway, if the
HashMapis really your bottleneck, maybe you want to use something else?