Possible Duplicate:
Java Hashmap: How to get key from value?
I am looking for a Java data structure (Some sort of map) in which I can perform a lookup on the Keys and the Values. For instance suppose I have a one to one mapping between a set of strings and integers. Call this object mapper. I would like to be able to perform the following:
mapper.getAssociated(value)
: This would return the keymapper.getAssociated(key)
: This would return the value