PopupStep (final AddItemPopupAction<?> selectedValue, final boolean finalChoice) { if (selectedValue.hasSubStep()) { return selectedValue.createSubStep(); } return doFinalStep(() -> selectedValue.execute()); }