boolean (@NotNull ChooseByNameViewModel base, @NotNull String pattern, boolean everywhere, @NotNull ProgressIndicator indicator, @NotNull Processor<Object> consumer) { return filterElementsWithWeights(base, createParameters(base, pattern, everywhere), indicator, res -> consumer.process(res.getItem())); }