1
0
Fork 0

changed the implementation of addAll method. Before adding all the items in a collection, we check if the accumulator set is not empty

This commit is contained in:
Miriam Baglioni 2020-03-02 16:41:37 +01:00
parent 02815dd2cf
commit 50080c1b3c
1 changed files with 4 additions and 1 deletions

View File

@ -40,7 +40,10 @@ public class TypedRow implements Serializable {
}
public void addAll(Set<String> toadd){
public void addAll(Collection<String> toadd){
if(accumulator == null){
accumulator = new HashSet<>();
}
this.accumulator.addAll(toadd);
}