Closed Zipunrar closed 10 years ago
why should the keys and values should been swaped? in case of a poor lookup the results are found better( when staying in implemented way)
I thought the Key is the ID of the canteen and the Value the "clear" name. That would be the logical Order. Also the ID is better for Using as an Array Index then a String.
If poor Lookup would be a Problem (meaning ID could be double?), the Request to the Server would result in an not consistent Response?
There is a Mistake in the MensaController:
if(!locations.containsKey(location)){
throw new InvalidAttributeValueException("no valid location was chosen");
}
That Test is wrong. As long as the Key-Value Pairs are not switched (like i suggest).
The provided List should be redesign to the following Layout: