public void setContainerLastActions(List<ActionItem> lastActions) { removeContainerLastActions(); for (ActionItem lastAction : lastActions) { lastAction.ensureLastActionOf().add(this); } containerLastActions = lastActions; }
public void replaceContainerLastAction(ActionItem oldItem, ActionItem newItem) { if (containerLastActions == null) { return; } for (int i = 0; i < containerLastActions.size(); i++) { if (containerLastActions.get(i) == oldItem) { containerLastActions.set(i, newItem); if (oldItem.lastActionOf != null) { oldItem.lastActionOf.remove(this); } newItem.ensureLastActionOf().add(this); } } }