Source:
private ObservableList<Tab> createEngineSubCategoryTabs() { final MappedList<List<EngineSubCategoryPanel>, EngineCategoryDTO> engineSubCategoryTabGroups = new MappedList<>( this.engineCategories, engineCategory -> engineCategory.getSubCategories().stream() .map(engineSubCategory -> { final EngineSubCategoryPanel engineSubCategoryPanel = new EngineSubCategoryPanel(); engineSubCategoryPanel.setEngineCategory(engineCategory); engineSubCategoryPanel.setEngineSubCategory(engineSubCategory); engineSubCategoryPanel.setEnginesPath(this.enginesPath); engineSubCategoryPanel.setFilter(this.filter); engineSubCategoryPanel.setEngine(this.engines.get(engineCategory.getName().toLowerCase())); engineSubCategoryPanel.selectedListWidgetProperty() .bind(this.sidebar.selectedListWidgetProperty()); engineSubCategoryPanel.setOnEngineSelect(this::showEngineDetails); return engineSubCategoryPanel; }).collect(Collectors.toList())); final ConcatenatedList<EngineSubCategoryPanel> engineSubCategoryTabs = ConcatenatedList .create(engineSubCategoryTabGroups); final FilteredList<EngineSubCategoryPanel> filteredEngineSubTabs = engineSubCategoryTabs .sorted(Comparator .comparing(engineSubCategoryTab -> engineSubCategoryTab.getEngineSubCategory().getName())) .filtered(this.filter::filter); filteredEngineSubTabs.predicateProperty().bind( Bindings.createObjectBinding(() -> this.filter::filter, this.filter.searchTermProperty(), this.filter.showInstalledProperty(), this.filter.showNotInstalledProperty())); return new MappedList<>(filteredEngineSubTabs, engineSubCategoryPanel -> new Tab(engineSubCategoryPanel.getEngineSubCategory().getDescription(), engineSubCategoryPanel)); }

Target:
private ObservableList<Tab> createEngineSubCategoryTabs() { final MappedList<List<EngineSubCategoryPanel>, EngineCategoryDTO> engineSubCategoryPanelGroups = new MappedList<>( this.engineCategories, engineCategory -> engineCategory.getSubCategories().stream() .map(engineSubCategory -> { final EngineSubCategoryPanel engineSubCategoryPanel = new EngineSubCategoryPanel(); engineSubCategoryPanel.setEngineCategory(engineCategory); engineSubCategoryPanel.setEngineSubCategory(engineSubCategory); engineSubCategoryPanel.setEnginesPath(this.enginesPath); engineSubCategoryPanel.setFilter(this.filter); engineSubCategoryPanel.setEngine(this.engines.get(engineCategory.getName().toLowerCase())); engineSubCategoryPanel.selectedListWidgetProperty() .bind(this.sidebar.selectedListWidgetProperty()); engineSubCategoryPanel.setOnEngineSelect(this::showEngineDetails); return engineSubCategoryPanel; }).collect(Collectors.toList())); final ConcatenatedList<EngineSubCategoryPanel> engineSubCategoryPanels = ConcatenatedList .create(engineSubCategoryPanelGroups); final FilteredList<EngineSubCategoryPanel> filteredEngineSubCategoryPanels = engineSubCategoryPanels .sorted(Comparator .comparing(engineSubCategoryPanel -> engineSubCategoryPanel.getEngineSubCategory().getName())) .filtered(this.filter::filter); filteredEngineSubCategoryPanels.predicateProperty().bind( Bindings.createObjectBinding(() -> this.filter::filter, this.filter.searchTermProperty(), this.filter.showInstalledProperty(), this.filter.showNotInstalledProperty())); return new MappedList<>(filteredEngineSubCategoryPanels, engineSubCategoryPanel -> new Tab(engineSubCategoryPanel.getEngineSubCategory().getDescription(), engineSubCategoryPanel)); }