Closed palra closed 9 years ago
Why? It doesn't seem so important
Le dim. 14 juin 2015 19:07, Loïc Payol notifications@github.com a écrit :
In Java, HashMap<K,V>#containsValue takes an Object in parameter, even it its generic form, so we should follow the rules.
— Reply to this email directly or view it on GitHub https://github.com/palra/univ-mmorpg/issues/20.
Just for compatibility with the Java standards, otherwise that's not so important
https://github.com/palra/univ-mmorpg/blob/feature/serialization/src/main/java/fr/univdevs/mmorpg/engine/character/Inventory.java#L174-L182
In Java,
HashMap<K,V>#containsValue
takes an Object in parameter, even it its generic form, so we should follow the rules. See : http://docs.oracle.com/javase/7/docs/api/java/util/Map.html#containsValue(java.lang.Object)We should also change the
remove
method so it takes anObject
in parameter too, asHashMap<K,V>#remove(Object)
has(Item)
->has(Object)
remove(Item)
->remove(Object)