Is there a way in Java to create a collection (map) with fixed size and length? I.e., I would like to initialize it with K constant keys (e.g. strings) but still want to be able to change the values.
Edit: The test case has a fixed number of objects, each one corresponds to a number (float). Each time a specific event in the application occurs, I would like to multiply all the numbers in the collection, except the number that corresponds to the object that "caused" the event. The number is not logically an attribiute of the object.