This builds the SubordinateControl. This method will throw a SystemException if the condition is invalid, or
there are no actions specified.

@return a SubordinateControl built using this builder.
430208
public WSubordinateControl build() {
		if (!condition().validate()) {
			throw new SystemException("Invalid condition: " + condition);
		}

		if (getActionsWhenTrue().isEmpty() && getActionsWhenFalse().isEmpty()) {
			throw new SystemException("No actions to execute");
		}

		WSubordinateControl subordinate = new WSubordinateControl();
		Rule rule = new Rule();

		BooleanExpression expression = getCondition();
		rule.setCondition(expression.build());

		for (Action action : getActionsWhenTrue()) {
			rule.addActionOnTrue(action.build());
		}

		for (Action action : getActionsWhenFalse()) {
			rule.addActionOnFalse(action.build());
		}

		subordinate.addRule(rule);
		return subordinate;
	}
34826
public IIconProvider build()
	{
		switch (type)
		{
			case DEFAULT:
				return (IIconProvider) () -> defaultIcon;
			case SIDES:
				return (ISidesIconProvider) side -> MoreObjects.firstNonNull(sidesIcons.get(side), defaultIcon);
			case STATE:
				return getStateIconProvider();
			case WALL:
				return getWallIconProvider();
			case CONNECTED:
				return new ConnectedIconsProvider(this);
			case MODEL:
				return new ModelIconProvider(this);

			default:
				return null;
		}
	}
768818
protected T construct() {
        if (_targetConstructor.isPresent()) {
            return _targetConstructor.get().apply(this);
        }
        try {
            final Constructor<? extends T> constructor = _targetClass.get().getDeclaredConstructor(this.getClass());
            AccessController.doPrivileged((PrivilegedAction<Object>) () -> {
                constructor.setAccessible(true);
                return null;
            });
            return constructor.newInstance(this);

        } catch (final NoSuchMethodException
                | SecurityException
                | InstantiationException
                | IllegalAccessException
                | IllegalArgumentException e) {
            throw new UnsupportedOperationException(
                    String.format(UNABLE_TO_CONSTRUCT_TARGET_CLASS, _targetClass),
                    e);
        } catch (final InvocationTargetException e) {
            // If the constructor of the class threw an exception, unwrap it and
            // rethrow it. If the constructor throws anything other than a
            // RuntimeException we wrap it.
            final Throwable cause = e.getCause();
            if (cause instanceof RuntimeException) {
                throw (RuntimeException) cause;
            }
            throw new UnsupportedOperationException(
                    String.format(UNABLE_TO_CONSTRUCT_TARGET_CLASS, _targetClass),
                    cause);
        }
    }
950173
protected AbstractDraweeController buildController() {
    if (FrescoSystrace.isTracing()) {
      FrescoSystrace.beginSection("AbstractDraweeControllerBuilder#buildController");
    }
    AbstractDraweeController controller = obtainController();
    controller.setRetainImageOnFailure(getRetainImageOnFailure());
    controller.setContentDescription(getContentDescription());
    controller.setControllerViewportVisibilityListener(getControllerViewportVisibilityListener());
    maybeBuildAndSetRetryManager(controller);
    maybeAttachListeners(controller);
    if (FrescoSystrace.isTracing()) {
      FrescoSystrace.endSection();
    }
    return controller;
  }
51403
private void buildUI() {
		buildTargetPanel();
		buildConfigOptions();
		add(new WHorizontalRule());
		add(panel);
		add(new WHorizontalRule());

		// We need this reflection of the selected menu item just so we can reuse the menu from the
		// MenuBarExample. It serves no purpose in this example so I am going to hide it.
		WPanel hiddenPanel = new WPanel() {
			@Override
			public boolean isHidden() {
				return true;
			}
		};
		hiddenPanel.add(selectedMenuText);
		add(hiddenPanel);
		add(new WAjaxControl(applyConfigButton, panel));
		buildSubordinates();
	}
1096638
@Override
    public final void createPartControl(Composite parent) {
        root = createRootControl(parent);
        makeActions();
        hookContextMenu();
        hookDoubleClickAction();
        contributeToActionBars();
    }
65790
public final ControlCompleted createNewControlCompleted() throws MessageCreateFailedException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createNewControlCompleted");
    ControlCompleted msg = null;
    try {
      msg = new ControlCompletedImpl(MfpConstants.CONSTRUCTOR_NO_OP);
    }
    catch (MessageDecodeFailedException e) {
      /* No need to FFDC this as JsMsgObject will already have done so */
      // No FFDC code needed
      throw new MessageCreateFailedException(e);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createNewControlCompleted");
    return msg;
  }
412175
public WaitActionConditionBuilder execution() {
        ActionCondition condition = new ActionCondition();
        container.setCondition(condition);
        containers.push(container);
        return new WaitActionConditionBuilder(container, condition, this);
    }
1329964
private void buildSubordinates() {
		WSubordinateControl control = new WSubordinateControl();
		Rule rule = new Rule();
		rule.setCondition(new Equal(panelType, WPanel.Type.HEADER));
		rule.addActionOnTrue(new Show(showUtilBarField));
		rule.addActionOnTrue(new Show(showMenuField));
		rule.addActionOnTrue(new Hide(contentField));
		rule.addActionOnFalse(new Hide(showUtilBarField));
		rule.addActionOnFalse(new Hide(showMenuField));
		rule.addActionOnFalse(new Show(contentField));
		control.addRule(rule);
		rule = new Rule();
		rule.setCondition(
			new Or(
				new Equal(panelType, WPanel.Type.CHROME),
				new Equal(panelType, WPanel.Type.ACTION),
				new Equal(panelType, WPanel.Type.HEADER)
			));
		rule.addActionOnTrue(new Show(headingField));
		rule.addActionOnFalse(new Hide(headingField));
		control.addRule(rule);
		add(control);
	}
206865
private void addSubordinate() {
		// Set up subordinate (to make mandatory/optional)
		WComponentGroup<SubordinateTarget> inputs = new WComponentGroup<>();
		add(inputs);
		inputs.addToGroup(checkBoxSelect);
		inputs.addToGroup(multiDropdown);
		inputs.addToGroup(multiSelect);
		inputs.addToGroup(multiSelectPair);
		inputs.addToGroup(dropdown);
		inputs.addToGroup(radioButtonSelect);
		inputs.addToGroup(singleSelect);
		inputs.addToGroup(checkBox);
		inputs.addToGroup(dateField);
		inputs.addToGroup(emailField);
		inputs.addToGroup(fileWidget);
		inputs.addToGroup(multiFileWidget);
		inputs.addToGroup(multiTextField);
		inputs.addToGroup(numberField);
		inputs.addToGroup(partialDateField);
		inputs.addToGroup(phoneNumberField);
		inputs.addToGroup(radioButton);
		inputs.addToGroup(shuffler);
		inputs.addToGroup(textField);
		inputs.addToGroup(textArea);
		inputs.addToGroup(radioButton1);
		inputs.addToGroup(radioButton2);
		inputs.addToGroup(radioButton3);

		WSubordinateControl control = new WSubordinateControl();
		add(control);

		// Mandatory
		Rule rule = new Rule();
		rule.setCondition(new Equal(mandatory, "true"));
		rule.addActionOnTrue(new Mandatory(inputs));
		rule.addActionOnFalse(new Optional(inputs));
		control.addRule(rule);

		// Disabled
		rule = new Rule();
		rule.setCondition(new Equal(disabled, "true"));
		rule.addActionOnTrue(new Disable(inputs));
		rule.addActionOnFalse(new Enable(inputs));
		control.addRule(rule);
	}
57353
public CMAEditorInterface addControl(Control control) {
    if (controls == null) {
      controls = new ArrayList<Control>();
    }

    controls.add(control);
    return this;
  }
655189
public CamelControlBusActionBuilder controlBus() {
		CamelControlBusAction camelControlBusAction = new CamelControlBusAction();
		camelControlBusAction.setCamelContext(getCamelContext());
		action.setDelegate(camelControlBusAction);

		return new CamelControlBusActionBuilder(camelControlBusAction);
	}
1095271
public static DocumentBuilderFactory getControlDocumentBuilderFactory() {
        if (controlBuilderFactory == null) {
            controlBuilderFactory = DocumentBuilderFactory.newInstance();
            controlBuilderFactory.setNamespaceAware(true);
            if (enableXXEProtection) {
                DocumentBuilderFactoryConfigurer.Default.configure(controlBuilderFactory);
            }
        }
        return controlBuilderFactory;
    }
954939
@SuppressWarnings("unchecked")
    protected P buildRootPane() throws CoreException {

        // Build the root node by reflection without any parameter or excluded class
        this.rootNode = (P) ClassUtility.buildGenericType(this.getClass(), Pane.class);
        return this.rootNode;
    }
112908
@Nonnull
	public final UnaryOperator<T> build() {

		final UnaryOperator<T> eventuallyFinal = this.eventually;

		UnaryOperator<T> retval;

		final Case<LPredicate<T>, UnaryOperator<T>>[] casesArray = cases.toArray(new Case[cases.size()]);
		retval = Function4U.<T> unaryOp(a -> {
			try {
				for (Case<LPredicate<T>, UnaryOperator<T>> aCase : casesArray) {
					if (aCase.casePredicate().test(a)) {
						return aCase.caseFunction().apply(a);
					}
				}

				return eventuallyFinal.apply(a);
			} catch (Error e) { // NOSONAR
					throw e;
				} catch (Throwable e) { // NOSONAR
					throw Handler.handleOrPropagate(e, handling);
				}
			});

		if (consumer != null) {
			consumer.accept(retval);
		}
		return retval;
	}
975773
public SubProcessBuilder subProcessDone() {
    BpmnModelElementInstance lastSubProcess = element.getScope();
    if (lastSubProcess != null && lastSubProcess instanceof SubProcess) {
      return ((SubProcess) lastSubProcess).builder();
    }
    else {
      throw new BpmnModelException("Unable to find a parent subProcess.");
    }
  }
1128931
protected int getNextSeqControl() {
        int res = seqControl.getAndIncrement();

        // if (!seqControl.compareAndSet(256, 1)) {
        // return seqControl.getAndIncrement();
        // } else {
        // return 0;
        // }

        // seqControl++;
        // if (seqControl > 255) {
        // seqControl = 0;
        //
        // }
        // return seqControl;

        if (this.stack.getSlsRangeType() == SlsRangeType.Odd) {
            if (res % 2 == 0)
                res++;
        } else if (this.stack.getSlsRangeType() == SlsRangeType.Even) {
            if (res %2 != 0)
                res++;
        }
        res = res & 0xFF;

        return res;
    }