We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1fc9352 commit 45d7888Copy full SHA for 45d7888
Core/src/main/java/org/reactome/server/analysis/core/util/MapSet.java
@@ -13,9 +13,7 @@ public class MapSet<S,T> implements Serializable {
13
14
public void add(S identifier, T elem){
15
Set<T> aux = getOrCreate(identifier);
16
- if(!aux.contains(elem)){
17
- aux.add(elem);
18
- }
+ aux.add(elem);
19
}
20
21
public void add(S identifier, Set<T> set){
@@ -39,10 +37,8 @@ public Set<T> getElements(S identifier){
39
37
40
38
41
private Set<T> getOrCreate(S identifier){
42
- Set<T> set;
43
- if(map.containsKey(identifier)){
44
- set = map.get(identifier);
45
- }else{
+ Set<T> set = map.get(identifier);
+ if(set==null){
46
set = new HashSet<T>();
47
map.put(identifier, set);
48
0 commit comments