List<ModuleWizardStep> () { if (mySelectedSteps == null) { mySelectedSteps = new ArrayList<>(); mySelectedSteps.addAll(myCommonSteps); for (String type : myTypes) { Collection<ModuleWizardStep> steps = mySpecificSteps.get(type); mySelectedSteps.addAll(steps); } for (Pair<ModuleWizardStep, Predicate<? super Set<String>>> pair : myCommonFinishingSteps) { Predicate<? super Set<String>> types = pair.getSecond(); if (types == null || types.test(new HashSet<>(myTypes))) { mySelectedSteps.add(pair.getFirst()); } } for (String type : myTypes) { Collection<ModuleWizardStep> steps = mySpecificFinishingSteps.get(type); mySelectedSteps.addAll(steps); } ContainerUtil.removeDuplicates(mySelectedSteps); } return ContainerUtil.filter(mySelectedSteps, it -> !isIgnoredStep(it)); }