ImmutableList<ActionItem> (@NotNull ActionRole role, @NotNull Map<SdkType, NewSdkAction> actions) { if (!myActionRoleFilter.value(role)) return ImmutableList.of(); ImmutableList.Builder<ActionItem> builder = ImmutableList.builder(); for (NewSdkAction action : actions.values()) { builder.add(new ActionItem(role, action, null)); } return builder.build(); }