/** * Returns the steps contained in this flow. Do not modify the returned * collection directly. * * @return a collection of the steps */ public List<FlowStep> getSteps() { List<FlowStep> steps = getUseCase().getModifiableSteps().stream() .filter(step -> step instanceof FlowStep) .map(step -> (FlowStep)step) .filter(step -> this.equals(step.getFlow())) .collect(Collectors.toList()); return Collections.unmodifiableList(steps); }