Performs an action for each element of this stream.

<p>This is a terminal operation.

@param action a non-interfering action to perform on the elements
511655
public void forEach(@NotNull IntConsumer action) {
        while(iterator.hasNext()) {
            action.accept(iterator.nextInt());
        }
    }
117379
@UiThread
  @SafeVarargs public static <T extends View> void run(@NonNull T[] array,
      @NonNull Action<? super T>... actions) {
    for (int i = 0, count = array.length; i < count; i++) {
      for (Action<? super T> action : actions) {
        action.apply(array[i], i);
      }
    }
  }
706259
private void insertAction(final Element subTree, final QName attName, final Action action) {
        if (subTree == null || action == null) {
            return;
        }

        final LinkedList<Element> queue = new LinkedList<>();

        // Skip the sub-tree root because it has been added already.
        NodeList children = subTree.getChildNodes();
        for (int i = 0; i < children.getLength(); i++) {
            if (children.item(i).getNodeType() == Node.ELEMENT_NODE) {
                queue.offer((Element)children.item(i));
            }
        }

        while (!queue.isEmpty()) {
            final Element node = queue.poll();
            children = node.getChildNodes();
            for (int i = 0; i < children.getLength(); i++) {
                if (children.item(i).getNodeType() == Node.ELEMENT_NODE) {
                    queue.offer((Element)children.item(i));
                }
            }
            if (SUBJECTSCHEME_SUBJECTDEF.matches(node)) {
                final String key = node.getAttribute(ATTRIBUTE_NAME_KEYS);
                if (key != null && !key.trim().isEmpty()) {
                    final FilterKey k = new FilterKey(attName, key);
                    if (!filterMap.containsKey(k)) {
                        filterMap.put(k, action);
                    }
                }
            }
        }
    }
186992
public void addCommitAction(final Runnable action) throws HibernateException
	{
		if (action == null)
			return; // ignore null actions

		addAction(new BaseSessionEventListener()
		{
			@Override
			public void transactionCompletion(final boolean successful)
			{
				if (successful)
					action.run();
			}
		});
	}
494155
public void addAction(M element, int value)
    {
        actions.put(element, Integer.valueOf(value));
    }
1140167
public void setActions(com.google.api.ads.admanager.axis.v201902.ProgressAction[] actions) {
        this.actions = actions;
    }
69127
protected void processActions(Element element, PdfAction action, ArrayList allActions) {
        if (element.type() == Element.ANCHOR) {
            String url = ((Anchor) element).getReference();
            if (url != null) {
                action = new PdfAction(url);
            }
        }
        Iterator i;
        switch (element.type()) {
            case Element.PHRASE:
            case Element.SECTION:
            case Element.ANCHOR:
            case Element.CHAPTER:
            case Element.LISTITEM:
            case Element.PARAGRAPH:
                for (i = ((ArrayList) element).iterator(); i.hasNext();) {
                    processActions((Element) i.next(), action, allActions);
                }
                break;
            case Element.CHUNK:
                allActions.add(action);
                break;
            case Element.LIST:
                for (i = ((List) element).getItems().iterator(); i.hasNext();) {
                    processActions((Element) i.next(), action, allActions);
                }
                break;
            default:
                int n = element.getChunks().size();
                while (n-- > 0)
                    allActions.add(action);
                break;
        }
    }
1062720
@UiThread
  @SafeVarargs public static <T extends View> void run(@NonNull T view,
      @NonNull Action<? super T>... actions) {
    for (Action<? super T> action : actions) {
      action.apply(view, 0);
    }
  }
798838
public void addActionsToActionStateExecutionListAt(final Flow flow, final String actionStateId, final int position, final EvaluateAction... actions) {
        val actionState = getState(flow, actionStateId, ActionState.class);
        val currentActions = new ArrayList<Action>();
        val actionList = actionState.getActionList();
        actionList.forEach(currentActions::add);
        val index = position < 0 || position == Integer.MAX_VALUE ? currentActions.size() : position;
        currentActions.forEach(actionList::remove);
        Arrays.stream(actions).forEach(a -> currentActions.add(index, a));
        actionList.addAll(currentActions.toArray(Action[]::new));
    }
1344799
public void setAction(String action) throws ApplicationException {
	if (StringUtil.isEmpty(action)) return;
	action = action.toLowerCase().trim();
	if (action.equals("run")) this.action = ACTION_RUN;
	else if (action.equals("delete")) this.action = ACTION_DELETE;
	else if (action.equals("update")) this.action = ACTION_UPDATE;
	else if (action.equals("list")) this.action = ACTION_LIST;
	else if (action.equals("lists")) this.action = ACTION_LIST;
	else if (action.equals("pause")) this.action = ACTION_PAUSE;
	else if (action.equals("resume")) this.action = ACTION_RESUME;
	else throw new ApplicationException("attribute action with value [" + action + "] of tag schedule is invalid",
		"valid attributes are [delete,run,update,list,resume,pause]");
    }
349555
public EntityBuilder addAction(Action action) {
    	if(action == null) {
    		throw new IllegalArgumentException("action cannot be null.");
    	}
    	addStep("_addAction", new Object[] { action }, true);
        return this;
    }
126342
public void addAction(ModelAction action, ModelActionListener listener)
    {
        
        synchronized(actionQueue) {
            this.actionQueue.add(new ModelActionEntry(action, listener));
        }
        
        wakeUp();
        
    }
1206841
public static void configureAction (AbstractButton button, String action)
    {
        button.setActionCommand(action);
        button.addActionListener(DISPATCHER);
    }
112669
public CmdLineAction onSwitch(Consumer<@NonNull String> action) {
		SwitchCmdLineAction switchAction = new SwitchCmdLineAction(action);

		this.switchActions.add(switchAction);
		return switchAction;
	}
562003
@Override
    public void doAction(Action action) {
        BaseComponent parent = getParent();
        
        switch (action) {
            case REMOVE:
                ActionListener.unbindActionListeners(this, actionListeners);
                detach();
                break;
            
            case HIDE:
            case COLLAPSE:
                setVisible(false);
                break;
            
            case SHOW:
            case EXPAND:
                setVisible(true);
                break;
            
            case TOP:
                parent.addChild(this, 0);
                break;
        }
        
        if (parent != null) {
            EventUtil.post(MainController.ALERT_ACTION_EVENT, parent, action);
        }
    }
100575
public void setAction(final Action action) {
		MenuItemModel model = getOrCreateComponentModel();
		model.action = action;
		model.url = null;
	}
997619
public static void doAction(JTextField textField){
        String command = null;
        if(textField.getAction()!=null)
            command = (String)textField.getAction().getValue(Action.ACTION_COMMAND_KEY);
        ActionEvent event = null;
        
        for(ActionListener listener: textField.getActionListeners()){
            if(event==null)
                event = new ActionEvent(textField, ActionEvent.ACTION_PERFORMED, command, System.currentTimeMillis(), 0);
            listener.actionPerformed(event);
        }
    }