i have objects X and Y of class Container. Both are asociated to a ParameterMap object, wich is a map String-String (request parameter values). let be:
X exampleX;
Y exampleY;
I want to know if exampleX is asociated with the same ParameterMap as exampleY. As i dont really need the value of the map, i thought i could store in class Container a integer, the result of hash function to the parameterMap which the object is asociated. So, if X.parameterMapHash == Y.parameterMapHash, then the maps have the same values for the same keys....
Is this a good approach? How can i make this in java? i need something to make a hash from a object...