[Minor] Also allow to pass a Set for filter
This commit is contained in:
parent
22892671a5
commit
bc52cdabda
|
@ -7,6 +7,7 @@ import java.util.Date;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collector;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
@ -95,6 +96,15 @@ public class GenericReport {
|
|||
return this;
|
||||
}
|
||||
|
||||
public GenericReport filter(String type, Set<String> ids) {
|
||||
if (this.filtersByType == null)
|
||||
this.filtersByType = new MapOfSets<>();
|
||||
for (String id : ids) {
|
||||
this.filtersByType.addElement(type, id);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public Stream<Map<String, StrolchRootElement>> buildStream() {
|
||||
|
||||
// get the report
|
||||
|
|
Loading…
Reference in New Issue