List<VFSInitException> (@NotNull VFSInitException.ErrorCategory firstCategory, VFSInitException.ErrorCategory @NotNull ... restCategories) { EnumSet<VFSInitException.ErrorCategory> categories = EnumSet.of(firstCategory, restCategories); return problemsDuringLoad.stream() .filter(p -> categories.contains(p.category())) .toList(); }