forked from External/mage
replaced various !contains -> put with putIfAbsent
This commit is contained in:
parent
ab624c22ef
commit
316137b5e2
5 changed files with 16 additions and 27 deletions
|
|
@ -64,9 +64,7 @@ public class LookedAt extends HashMap<String, Cards> implements Serializable, Co
|
|||
}
|
||||
|
||||
public Cards createLookedAt(String name) {
|
||||
if (!this.containsKey(name)) {
|
||||
this.put(name, new CardsImpl());
|
||||
}
|
||||
putIfAbsent(name, new CardsImpl());
|
||||
return this.get(name);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue