List<Configurable> (@NotNull Predicate<? super Configurable> visitor, @NotNull List<? extends ConfigurableGroup> groups) { List<Configurable> list = new ArrayList<>(); Consumer<Configurable> consumer = configurable -> { if (visitor.test(configurable)) { list.add(configurable); } }; for (ConfigurableGroup group : groups) { collect(consumer, group.getConfigurables()); } return list; }